Spain, anyone?

Forum devoted to country/league/cup/team definition topics. You can also get help here if you have trouble writing or using a definition.
MarkC
Posts: 96
Joined: Tue Mar 29, 2005 10:34 pm

Post by MarkC »

gyboth wrote:as for the definition, it's a pity mark isn't around lately, he's quite a good definition-maker. but maybe i'll have time for it a bit later (if i manage to set up gentoo, that is ;-)).
Gyözö emailed me to wake me up, so here I am :)
I've started on the definition but I'm afraid there is a problem with the layer 3 promotion system. When the program relegates teams from Segunda División to the third layer, it just puts one team in each of the four divisions. It has no way of knowing how many teams got promoted from each division so it ends up in a hopeless mess!

For now, just to get us started, I'm going to change the system so that each Liguilla contains the top four teams from a single division, to ensure that one team from each division gets promoted. I'll also simplify the Copa del Rey until we get the team choosing sorted out. Gyözö thinks it should be fairly easy, but his relationship with the code is much more intimate than mine. :)

There might be a fairly simple solution to the prom/rel problem. I'm thinking of getting the program to keep a count of how many teams are removed from each division for promotion/relegation, then using this information to decide (randomly) where to put teams with more than one possible destination.
This problem can exist even with fairly simple promotion systems. For example, a country with two parallel leagues might promote three teams: the winner of each, together with the winner of a playoff between the second place teams. The program has to relegate three teams but doesn't know which league to put two teams into. Indeed, something similar happens with the two English divisions below the Conference, but the playoffs are much more drawn out. We do seem to love our playoffs here in England :roll:

Mark
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

MarkC wrote:I've started on the definition but I'm afraid there is a problem with the layer 3 promotion system. When the program relegates teams from Segunda División to the third layer, it just puts one team in each of the four divisions. It has no way of knowing how many teams got promoted from each division so it ends up in a hopeless mess!
true :-? hadn't thought of this before.
For now, just to get us started, I'm going to change the system so that each Liguilla contains the top four teams from a single division, to ensure that one team from each division gets promoted.
another possibility would be to take one cup instead of four (the former would have the disadvantage of random groups), with one round robin stage and then let the 4 best teams advance and the rest move to the 3rd layer. what i'm not sure about, though, is whether the comparison function (cup_compare_success(), i think) rates teams with a higher rank in their group higher or teams with more points; the first one is what we'd need; maybe we'd have to change the compare func accordingly.
There might be a fairly simple solution to the prom/rel problem. I'm thinking of getting the program to keep a count of how many teams are removed from each division for promotion/relegation, then using this information to decide (randomly) where to put teams with more than one possible destination.
you know how these things are ;-) simple as long as it's theory. but if you find a good implementation, it'll certainly make the code and the prom/rel system better, so go ahead. if you don't have the time i might try to implement it later; your improvement suggestions always proved to be worth the time spent on implementing them in the end ;-)

gyözö
Press any key to continue or any other key to quit.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

i just looked it up. the compare function takes rank over points, so we wouldn't have to mess with it if we take one cup for the promotion games.

gyözö
Press any key to continue or any other key to quit.
MarkC
Posts: 96
Joined: Tue Mar 29, 2005 10:34 pm

Post by MarkC »

OK, I've added the Spanish definition to CVS, and replaced the Spanish "short league" wherever it's used.

Bentzia, I don't know what version you're using. If you're running the CVS version then in a couple of hours Spain should be available.

If you're using the 1.9 installation, then unpack the attached zip file in either one of two places:
.bygfoot-1.9/definitions (in your home directory), or
support_files/definitions (in the place you installed bygfoot)

The zip file version doesn't include European cups because if you want to use those with Spain, you need to tell the European files not to use the Spanish "short league" any more. If you want to do this but you're not sure how, just ask and I'll give you some instructions or a new zip file.

I have a question about the Spanish cups. In the first round of the Copa del Rey, 19 teams play: the top 18 from layer 2 and the winner of the last Copa RFEF. But what happens if the winner of the last RFEF is also in the top 18 of layer 2? Which team is chosen for the 19th place, or do only 18 teams play?

Things that still need doing:

Team names. I've just used the lists that you posted, but as Gyözö said, some of them still need changing, for example, Espanyol and Deportivo. This isn't top priority but it needs doing before 1.9.1 is released. I really need some help with which teams need changing, and what to call them.

Promotion/relegation system. To do this properly will need a code change.

Copa del Rey. Adding the layer 1 teams properly needs a code change, and I need to know how to handle the RFEF winner (see my question above).

I'll look at fixing these problems soon.

Mark
Attachments
spain.zip
(7.06 KiB) Downloaded 90 times
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

MarkC wrote:I'll also simplify the Copa del Rey until we get the team choosing sorted out. Gyözö thinks it should be fairly easy, but his relationship with the code is much more intimate than mine. :)
i've changed the code so that all teams for the cups are loaded at once when the fixtures for round 1 are generated. i've tested with the english and welsh defs, both of which contain cups that introduce new teams at later cup stages. i didn't notice any problems.

we could make a copa del rey definition now that works just like in reality. however, we might run into problems with other cups later; eg. if we wanted to implement the current CL system, where teams move from the CL to the UEFA cup after the first round robin stage. that wouldn't work, so we might need to add some tag to the choose_team 'struct' that tells us whether to load the choose_team at the beginning of the season or only just before the fixtures for the corresponding cup round get written.

gyözö
Press any key to continue or any other key to quit.
MarkC
Posts: 96
Joined: Tue Mar 29, 2005 10:34 pm

Post by MarkC »

I've updated the Spanish definition in CVS. The Copa del Rey now brings new teams into the cup just like Bentzia explained it. The playoff "Liguillas" also work properly now.

The winner of the Copa RFEF doesn't play in the Copa del Rey, because I still don't know what to do if that team is also one of the top 18 in Segunda División.

We still need unofficial names for a few teams, too.

Mark
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

MarkC wrote:We still need unofficial names for a few teams, too.
this won't be too hard to sort out, even if bentzia doesn't write us anymore. isaac (the debian guy) also told me once that doing the first two leagues or so is ok, too, so it's not that much work.

gyözö
Press any key to continue or any other key to quit.
bentzia

I'm here again

Post by bentzia »

Hi:

I was on holydays without Internet connection.
Now is late and I must go to sleep.

On a few days i'll answer some of your questions.

Regards
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Re: I'm here again

Post by gyboth »

bentzia wrote:On a few days i'll answer some of your questions.
good to hear you're back.

i've already done the team names for the better-known teams, but i might have made mistakes, so you better check. (do you know how to get cvs versions?)

gyözö
Press any key to continue or any other key to quit.
bentzia

About RFEF cup winner

Post by bentzia »

I've looking for this information but I did'nt find anything.

I think the better is to keep the 18 teams and let two teams pass to the next round without a game.

In the other hand, I have confirmation that the "Copa del Rey" will be played as I posted previously.

Regarding the team names, I think the names I give you can be used. For example:
Deportivo is the common name.
Deportivo de la Coruña is the name you listen on TV and radio
"Real Club Deportivo de la Coruña, SAD" is the official name

The same happens with the Espanyol.
Espanyol is the common name.
"Reial Club Deportiu Espanyol de Barcelona, SAD" is the official one.
MarkC
Posts: 96
Joined: Tue Mar 29, 2005 10:34 pm

Re: About RFEF cup winner

Post by MarkC »

bentzia wrote:I think the better is to keep the 18 teams and let two teams pass to the next round without a game.
Yes, that sounds sensible... but there are problems, as always!

1. Because we want to have 10 teams in round 2, the definition has to say how many teams get byes. This isn't possible because sometimes we need one bye and sometimes we need two byes.
2. If the program can't load all 19 different teams, then it gives a warning (not enough teams to choose from) and quits.

I'll discuss with Gyõzõ whether we can fix these for the release. Number 1. might be fixed by creating a tag that says how many teams to advance to the next round, which could be used instead of the byes tag.
Number 2. is just a case of allowing cup teams to be missing, perhaps only if the new tag is set for the round.

Otherwise, we'll just have to keep the cup simplified in some way.
bentzia wrote:In the other hand, I have confirmation that the "Copa del Rey" will be played as I posted previously.
That's good news.

Thanks for the information!

Mark
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Re: About RFEF cup winner

Post by gyboth »

MarkC wrote:I'll discuss with Gyõzõ whether we can fix these for the release. Number 1. might be fixed by creating a tag that says how many teams to advance to the next round, which could be used instead of the byes tag.
how about allowing two or more numbers in the 'byes' tag? the program then chooses the first one that leads to an even number of teams or the number divisible by the number of groups in case of a round robin. this would avoid introducing yet another tag.
Number 2. is just a case of allowing cup teams to be missing, perhaps only if the new tag is set for the round.
or maybe more than one number in the 'number_of_teams' tag? the program would then try to load the teams according to the first number, if it doesn't work then according to the next number etc.

both solutions would involve changes in the choose_team structs (int byes -> garray byes), which is why i'm against making them before the release (there's a feature freeze, let's not forget it),
Otherwise, we'll just have to keep the cup simplified in some way.
so i opt for this solution for the time being.
bentzia wrote:In the other hand, I have confirmation that the "Copa del Rey" will be played as I posted previously.
That's good news.
yes, this is good. thanks for your help, bentzia :-)

gyözö
Press any key to continue or any other key to quit.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Re: About RFEF cup winner

Post by gyboth »

bentzia wrote:Regarding the team names, I think the names I give you can be used. For example:
Deportivo is the common name.
Deportivo de la Coruña is the name you listen on TV and radio
"Real Club Deportivo de la Coruña, SAD" is the official name
i disagree. just because we don't have the exact long official name in the game it doesn't mean we're okay. 'deportivo' and 'espanyol' are clearly the clubs' names and nothing else, no city name or geographical name. Bygfoot is in several distributions, and i don't want to take any risks; besides, the users can get official names very easily with the update script.

gyözö
Press any key to continue or any other key to quit.
MarkC
Posts: 96
Joined: Tue Mar 29, 2005 10:34 pm

Re: About RFEF cup winner

Post by MarkC »

OK, agreed, we'll wait until after the release. I'll do the cup as best I can with the current system.
how about allowing two or more numbers in the 'byes' tag? the program then chooses the first one that leads to an even number of teams or the number divisible by the number of groups in case of a round robin. this would avoid introducing yet another tag.
Yeah, that would work in this case. Or changing the code to add an extra bye automatically if there is an odd number of teams in a knockout round. Actually that last idea is probably simple enough to sneak in before the release as a quick fix, but there's still the problem where the program quits if it can't fill all the team slots.

Having said this, you can bet your bottom Euro that some nasty, future definition will need a choice of, say, one, two or three byes. For example, imagine if there were two cups whose winners were allowed to play if not already selected.

On the other hand, I don't like the idea of adding an extra tag either, but...
How about replacing <byes> with the new tag after the release? Actually it's more logical. Whenever I create a definition, I think: How many teams do I need to advance to the next round? From there I calculate the number of byes myself. Why not let the program do it?
I don't think many definitions use <byes> at the moment (perhaps only mine) and it'd be easy to update them anyway.

Mark
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Re: About RFEF cup winner

Post by gyboth »

MarkC wrote:Having said this, you can bet your bottom Euro
bottom euro :lol: never heard this term. i guess it's rather bottom pound in your region?
On the other hand, I don't like the idea of adding an extra tag either, but...
How about replacing <byes> with the new tag after the release? Actually it's more logical. Whenever I create a definition, I think: How many teams do I need to advance to the next round? From there I calculate the number of byes myself. Why not let the program do it?
seems like a real extension of 'byes'. a superb idea, i think (unless we miss something). so good that i'm tempted to code it -- but freeze is freeze ;-)

only problem could be with round robin stages, but round robin stages and byes don't go well together anyway and i consider a cup def with a RR stage and teams getting a bye for it insane ;-)

gyözö
Press any key to continue or any other key to quit.
Post Reply