Regista6 / EA-FC-24-Automated-SBC-Solving

EA FC 24 Automated SBC Solving using Integer Programming ⚽
MIT License
31 stars 7 forks source link

Rarity issue #8

Open mgrecuu opened 4 months ago

mgrecuu commented 4 months ago

Hello,

First of all, I am very thankful for wha you have built! Many, many thanks!

I try to solve a SBC, where I need min. 6 rarity, but the solver doesn't give me not even one. If I follow the guideline to uncomment from the "optimize" I get "IndentationError: unexpected indent".

I was wondering if you'd have the time to help with any advice, I am not sure what I do wrong. I also tried a few things to make it work, but I wasn't able to figure it out by myself.

Could you please have a look and let me know how can I add that? Thank you!

I've added the files that I used under my repository. https://github.com/mgrecuu/EAFC

Regista6 commented 4 months ago

Hi, thanks so much for using solver 🙏!!

For the requirement here (https://github.com/mgrecuu/EAFC/blob/main/req.png):

  1. Set formation

  2. NUM_UNIQUE_LEAGUE = [5, "Exactly"] # Leagues: Max / Min / Exactly X in input.py and then uncomment create_unique_league_constraint in optimize.py.

  3. MAX_NUM_LEAGUE = 4 and create_max_league_constraint

  4. MAX_NUM_CLUB = 4 and create_max_club_constraint

  5. RARITY_2 = ["Rare"], NUM_RARITY_2 = [6] and create_rarity_2_constraint

  6. SQUAD_RATING = 69 and create_squad_rating_constraint_3

  7. Some extra things you can do is check the existing filters or add some filters in main.py under preprocess_data_2.

The indentation issue is here:

image

You need to add a backspace. Also there is no need to comment out stuff in input.py. Mostly you need to comment out the constraints in optimize.py which are not required for the sbc. Let me know if you any more questions or suggestions!!

mgrecuu commented 4 months ago

Hi Regista6,

Thank you so much for your assistance! I'm beginning to understand how to use it better, and I have to admit, it's really impressive.