Fixture Engine Development

sohum

Executive member
Joined
Aug 3, 2004
Location
San Francisco, CA
Profile Flag
India
PCCS Fixture Engine Development
This is the thread for the fixture engine development. The fixture engine team comprises of the following developers:

sohummisra (team leader)
pal

This thread is primarily a discussion thread for the feature team. However, it is completely transparent so that the public can step in and make suggestions at any point, since it is you lot who are going to be using the simulator when it is finally completed.

Now, if someone could reply to this thread so that my initial brainstorming isn't merged, I would be greatful. :)
 

pal

International Coach
Joined
Mar 5, 2004
Online Cricket Games Owned
Write a guide of how to use the XML with examples for end-users

This was in the other thread. Will we create a user interface for end-users to create/edit fixtures or will they edit the actual XML files themselves, assuming that's what is meant by the above quote?
 

sohum

Executive member
Joined
Aug 3, 2004
Location
San Francisco, CA
Profile Flag
India
I think XML is the best way to store the fixtures. That way anyone can customize their own feature and we can (way, way in the future) work on a graphical-based fixture editor. For now, though, we will provide a set of 5-6 pre-coded fixture XML files that can be used by the users of the application. People can share their own fixtures, if they want to, and hence make completely custom tournaments. Sort of like the feature you would like in every cricket-based game but has never been available. :)

Keep in mind that the XML is being developed with an idea of being re-used. So, any specific information should not be included here. For example, instead of creating an "Ashes" fixture, you would create a fixture that represented a 5-Test match series. When using the fixture, you would specify attributes such as name, etc. So as I see it, here are the main elements we can have:

tournament - the parent element
match - represents a match
pointstable - represents information about how the points table must be calculated (not the table itself)

More advanced/optional features could include
rounds/round - to show that it is a multi-round tournament such as a World Cup
pools/pool - to show that there are multiple pools such as an Asia Cup or the PCPL (pool == league ;))

Using these four elements, I have built a simple example of what I think could be the fixture XML for a Triangular series:

HTML:
<tournament id="Triangular Series" numberOfTeams="3" type="od" league="intl">
  <pointstable pointsPerWin="2" pointsPerLoss="0" pointsPerTie="1" pointsPerAbandoned="1" sortOrder="PTS,HEADTOHEAD,NRR,W">
  <rounds>
    <round id="r1">
      <match id="1" team1="1" team2="2" />
      <match id="2" team1="1" team2="3" />
      <match id="3" team1="2" team2="3" />
    </round>
    <round id="r2">
      <match id="1" team1="1" team2="2" />
      <match id="2" team1="1" team2="3" />
      <match id="3" team1="2" team2="3" />
    </round>
    <round id="finals">
      <match id="1" team1="POINTSTABLE[0]" team2="POINTSTABLE[1]" />
    </round>
  </rounds>
</tournament>

A few notes here. The round id and match id would be used to calculate a unique name for each match in that tournament. For example, "r1.3" would refer to the game 3 in round 1 and "r2.2" would refer to game 2 in round 2. You could use these values in the team1, team2 fields... for example to specify semifinal spots or something like that. POINTSTABLE would be a reserved name (all reserved names would be in caps) that can be used to access the closest points table. By closest, I mean that if you had separate pools, they would use a points table defined in the pool. So, a simplified quadrangular would look like this.

HTML:
<tournament id="Quadrangular Series" numberOfTeams="6" type="od" league="intl">
  <rounds>
    <round id="robin">
      <pools>
        <pool id="groupa">
          <pointstable pointsPerWin="2" pointsPerLoss="0" pointsPerTie="1" pointsPerAbandoned="1" sortOrder="PTS,HEADTOHEAD,NRR,W">
          <match id="1" team1="1" team2="2" />
          <match id="2" team1="1" team2="3" />
          <match id="3" team1="2" team2="3" />
        </pool>
        <pool id="groupb">
          <pointstable pointsPerWin="2" pointsPerLoss="0" pointsPerTie="1" pointsPerAbandoned="1" sortOrder="PTS,HEADTOHEAD,NRR,W">
          <match id="1" team1="4" team2="5" />
          <match id="2" team1="4" team2="6" />
          <match id="3" team1="5" team2="6" />
        </pool>
      <pools>
    </round>
    <round id="semis">
      <match id="1" team1="groupa.POINTSTABLE[0]" team2="groupb.POINTSTABLE[1]" />
      <match id="2" team1="groupb.POINTSTABLE[0]" team2="groupa.POINTSTABLE[1]" />
    </round>
    <round id="finals">
      <match id="1" team1="semis.1" team2="semis.2" />
    </round>
  </rounds>
</tournament>

The round.id.n refers to the winner of that specific game. Questions/comments welcome. This is going to be a non-trivial component with plenty of nifty programming! Luckily I have done something very similar before, albeit about a year and a half back. That was in Java, though.

sohummisra added 2 Minutes and 31 Seconds later...

This was in the other thread. Will we create a user interface for end-users to create/edit fixtures or will they edit the actual XML files themselves, assuming that's what is meant by the above quote?
I think for starters, we should just give them 4-5 XML files (including customized ones for PCCL and PCPL). The guide would basically be a more intuitive and better explained version of what I posted above. Giving them a GUI will be something that depends on how tired we are of the project and how far-reaching it may become.

The important thing to make sure is that everything is editable in the UI. So that if something wasn't done correctly in the XML, the users can manually modify it. But that is a UI issue IIRC.
 

smssia0112

Chairman of Selectors
Joined
Jul 15, 2005
For leagues, I'd suggest for every team to play each other twice (one home, one away) and numbers of the leagues shouldn't matter because we won't be doing large leagues anyway. I suggest that the most important things you look at be the ones that consume most of your time. Whilst we do want people to be able to use it themselves, it will be first and foremost for the use of our leagues.
 

sohum

Executive member
Joined
Aug 3, 2004
Location
San Francisco, CA
Profile Flag
India
Pal, I know you haven't had too much experience in XML, but let me know if you have any questions. I have attached two XML files for what I envision the XML will look for the old PCPL (current season) and new PCPL (next season). Tell me if you have any questions.

I think we should probably finalize our XML format over the next 2 days and get the parser written over the weekend.

In terms of splits, this is what I'm thinking of:

- I work on the parser seeing that I have done something very similar before, and it is a tough algorithm to wrap your head around (lots of recursion, stacks, temporary objects, etc.)
- You work on fine-tuning the XML format, writing a DTD that basically describes the rules for the XML and then deciding and writing the final XML files that we will be providing with the simulator.

What do you say?
 

Attachments

  • PCPLnew.xml.txt
    1.3 KB · Views: 67
  • PCPLold.xml.txt
    1.4 KB · Views: 48

pal

International Coach
Joined
Mar 5, 2004
Online Cricket Games Owned
Sorry, I was pretty busy during the last two days, but I'm free to work on it during the weekend. I'll take a look at those files now and start working on my part.
 

sohum

Executive member
Joined
Aug 3, 2004
Location
San Francisco, CA
Profile Flag
India
Sorry, I was pretty busy during the last two days, but I'm free to work on it during the weekend. I'll take a look at those files now and start working on my part.
Cool. Let me know if you have any questions about XML or suggestions for the format. Otherwise I will start working on the parser soon.
 

dancingmongoose

International Coach
Joined
Dec 15, 2009
Online Cricket Games Owned
  1. Don Bradman Cricket 14 - Steam PC
I suggest that the fixture editor can make fixtures FROM SCRATCH, not from a template
 

dancingmongoose

International Coach
Joined
Dec 15, 2009
Online Cricket Games Owned
  1. Don Bradman Cricket 14 - Steam PC
i tried doing the t20 world cup but it says "invalid number of teams"

<Tournament
MatchType="ShortSingleDay"
MatchLeague="DomesticSenior"
MatchLength="20"
NumberOfTeams="12">
<Round SubId="1">
<PointsTable Win="4" Loss="0" Tie="2" NoResult="2" UseBonusPoints="False" />
<Match DateOffset="2" Team1="1" Team2="2" />
<Match DateOffset="3" Team1="3" Team2='2' />
<Match DateOffset="6" Team1="3" Team2="1" />
</Round>
<Round SubId="2">
<PointsTable Win="4" Loss="0" Tie="2" NoResult="2" UseBonusPoints="False" />
<Match DateOffset="1" Team1="4" Team2="5" />
<Match DateOffset="4" Team1="5" Team2="6" />
<Match DateOffset="5" Team1="4" Team2="6" />
</Round>
<Round SubId="3">
<PointsTable Win="4" Loss="0" Tie="2" NoResult="2" UseBonusPoints="False" />
<Match DateOffset="2" Team1="7" Team2="8" />
<Match DateOffset="3" Team1="8" Team2="9" />
<Match DateOffset="6" Team1="7" Team2="9" />
</Round>
<Round SubId="4">
<PointsTable Win="4" Loss="0" Tie="2" NoResult="2" UseBonusPoints="False" />
<Match DateOffset="1" Team1="10" Team2="11" />
<Match DateOffset="4" Team1="10" Team2="12" />
<Match DateOffset="5" Team1="12" Team2="11" />
</Round>
<Round SubId="5">
<PointsTable Win="4" Loss="0" Tie="2" NoResult="2" UseBonusPoints="False" />
<Match Team1="{4:2}" Team2="{1:2}" DateOffset="7" />
<Match Team1="{2:1}" Team2="{3:2}" DateOffset="7" />
<Match Team1="{2:1}" Team2="{1:2}" DateOffset="9" />
<Match Team1="{4:2}" Team2="{3:2}" DateOffset="9" />
<Match Team1="{1:2}" Team2="{3:2}" DateOffset="11" />
<Match Team1="{4:2}" Team2="{2:1}" DateOffset="11" />
</Round>
<Round SubId="6">
<PointsTable Win="4" Loss="0" Tie="2" NoResult="2" UseBonusPoints="False" />
<Match Team1="{1:1}" Team2="{3:1}" DateOffset="8" />
<Match Team1="{4:1}" Team2="{2:2}" DateOffset="8" />
<Match Team1="{4:1}" Team2="{3:1}" DateOffset="10" />
<Match Team1="{1:1}" Team2="{2:2}" DateOffset="10" />
<Match Team1="{3:1}" Team2="{2:2}" DateOffset="11" />
<Match Team1="{4:1}" Team2="{1:1}" DateOffset="11" />
</Round>
<Round SubId="7">
<Match Team1="{5:1}" Team2="{6:2}" DateOffset="14" />
<Match Team1="{6:1}" Team2="{5:2}" DateOffset="15" />
</Round>
<Round SubId="7">
<Match Team1="{7-1}" Team2="{7-2}" DateOffset="17" />
</Round>
</Tournament>
 
Last edited:

Users who are viewing this thread

Top