Regista6 / EA-FC-Automated-SBC-Solving

EA FC 25 Automated SBC Solving using Integer Programming ⚽
MIT License
47 stars 9 forks source link

Fc25 Players #12

Open drRobertDev opened 3 weeks ago

drRobertDev commented 3 weeks ago

I generate Fc 25 players inventary

https://drive.google.com/file/d/1X6mmLpnx9uKUvTUI5rDCe3Bz42jkNFmS/view?usp=sharing

I added also Groups cause missing in your SBC solver some challange require Group parameter

Regista6 commented 3 weeks ago

Thanks a lot !!

I'll put this dataset in the repo. Although I did not understand the use case of Group.

drRobertDev commented 3 weeks ago

Example with Group : Bayer 04 Leverkusen v Eintracht Frankfurt

Rare: Min 3 (without group you dont have idea what players are good or not)

Raw Config EA: { "eligibilitySlot": 4, "eligibilityKey": "PLAYER_COUNT", "eligibilityValue": 3 }, { "eligibilitySlot": 4, "eligibilityKey": "SCOPE", "eligibilityValue": 0 }, { "eligibilitySlot": 4, "eligibilityKey": "PLAYER_RARITY_GROUP", "eligibilityValue": 4 },


EA Code;

case SBCEligibilityKey.PLAYER_RARITY_GROUP: ;(o = t.count), (r = this.getNumberOfPlayersByGroup(c)) break

[...]

(UTSBCChallengeEntity.prototype.getNumberOfPlayersByGroup = function ( t, e ) { if ((void 0 === e && (e = !1), !this.squad)) return 0 var n = this.squad return this.playerCountHelper(t, function (i) { return n.getNonBrickSlots(e).reduce(function (t, e) { return e.isValid() && e.getItem().belongsToGroup(i) ? ++t : t }, 0) }) }),

[...]

(UTItemEntity.prototype.belongsToGroup = function (t) { return -1 < this.groups.indexOf(t) }),


drRobertDev commented 3 weeks ago

I try to do this challange https://www.futbin.com/25/squad-building-challenges/Challenges/182/total-rush-challenge-3 as you can see all solutions are Gold players and 1 Bronze or 1 Silver, then not special players need it like icons.

requirements Same Nation Count: Min 5 Same League Count: Max 5 Clubs: Min 5 Rare: Min 5 Squad Rating: Min 80 Team Chemistry: Min 31 players in squad: 11

Config:

df = df[df['Rarity'].isin(['Common', 'Rare'])] # Filter out players with rarity other than Common and Rare we dont wanna solve with Icons or Special Players

FORMATION = "4-4-2" NUM_PLAYERS = 11 PLAYERS_IN_POSITION = False USE_ALTERNATE_POSITIONS = True NUM_UNIQUE_CLUB = [5, "Min"] NUM_UNIQUE_LEAGUE = [5, "Max"] NUM_UNIQUE_COUNTRY = [5, "Min"] RARITY_1 = ['Rare'] NUM_RARITY_1 = [5] SQUAD_RATING = 80 CHEMISTRY = 31

create_unique_club_constraint create_unique_league_constraint create_unique_country_constraint create_rarity_1_constraint (will be infeasible without will be unknow) create_squad_rating_constraint_3 create_chemistry_constraint

timeout 300

Maybe i setup something wrong? or there issue ?

Regista6 commented 3 weeks ago

Thanks a lot of taking interest!

So the config is slightly off.

SBC = https://www.futbin.com/25/squad-building-challenges/Challenges/182/total-rush-challenge-3

I used Catamarca FC_24.csv.

FORMATION = "4-4-2" and CHEMISTRY= 31. For other constraints, have a look at the below table.

Requirement Variable Function
Same Nation Count: Min 5 MIN_NUM_COUNTRY = 5 create_min_country_constraint
Same League Count: Max 5 MAX_NUM_LEAGUE = 5 create_max_league_constraint
Clubs: Min 5 NUM_UNIQUE_CLUB = [5, "Min"] create_unique_club_constraint
Rare: Min 5 RARITY_2 = ["Rare"], NUM_RARITY_2 = [5] create_rarity_2_constraint
Squad Rating: Min 80 SQUAD_RATING = 80 create_squad_rating_constraint_3

Let me know if you have any other questions! I’ve tried to comment the code as accurately as possible to match the SBC requirements as they typically appear.

Regista6 commented 3 weeks ago

SBC = https://www.futbin.com/25/squad-building-challenges/Challenges/186/bayer-04-leverkusen-v-eintracht-frankfurt

I used Catamarca FC_24.csv.

FORMATION = "4-3-3" and CHEMISTRY= 18. For other constraints, have a look at the below table.

Requirement Variable Function
# Players from Bundesliga: Min 2 LEAGUE = [["Bundesliga"]], NUM_LEAGUE = [2] create_league_constraint
Same League Count: Min 5 MIN_NUM_LEAGUE = 5 create_min_league_constraint
Same Nation Count: Max 3 MAX_NUM_COUNTRY = 3 create_max_country_constraint
Rare: Min 3 RARITY_2 = ["Rare"], NUM_RARITY_2 = [3] create_rarity_2_constraint
Player Level: Min Silver df = df[df["Color"] != "Bronze"]