GithubHelp home page GithubHelp logo

Comments (5)

dave0 avatar dave0 commented on August 11, 2024

Updated by dave0000 on 2007-03-16T04:32:33

Here's my ideas for improved region selection, copied from the mailing list. I think
we'd get better results from this than we would from trying to handle separate
wanted/unwanted region choices.

If we want to have region affinity, where east teams would only play east teams and
the occasional central team, the opponent selection code will need to start paying
attention to region preferences. This gets complicated if too many teams select a
region as their preferred region -- if there are more games for that region than
there are fields, should East-preferred teams take Central fields? If so, do bumped
Central teams end up playing in West?

A possible way to work around this is to use coordinate information to pick opponents
and fields:

  1. each field is assigned its latitude/longitude in the database. If no lat/long
    is available, a default value is used as a last resort.
  2. teams select a desired location, initially by choosing a region from a pulldown
    (which would be hardcoded behind-the-scenes to be some lat/long in the middle of that
    region), or by selecting a neighbourhood on an interactive map (Google Maps is much
    easier to plug in nowadays).
  3. when scheduling using the ladder, rather than choosing randomly from the "teams
    within N rating points not played in last M games" list, the distance from the
    current team to each of the available opponents is computed, and the team with the
    shortest distance is chosen. Home/away balancing happens as at present.
  4. when selecting fields:
    a) First, make a pass through ALL games scheduled for that night, and see if
    the home team has a home field configured. If so, allocate it, and take the game out
    of the todo list.
    b) Then, for each game, choose a point on the line between the two opponents'
    preferred locations. This could be the midpoint, or it could be weighted towards the
    home team (maybe 1/3 - 2/3?). Then, search for the nearest field to that point, and
    assign it.

This handles all of the region and field preference stuff that we're already doing,
plus it should more gracefully handle the east/west problem TUC has, since two teams
in the East would only end up on a West field if there's absolutely nothing closer.
It does remove some of the randomness from the scheduling, but if we want to keep
people playing in the same region, it's hard to avoid.

from leaguerunner.

dave0 avatar dave0 commented on August 11, 2024

Updated by tonysa13 on 2007-03-16T13:10:13

I agree, Dave, that your solution would be better. However, it would also take a
lot longer to implement. In the mean time, the scheduling code already looks at
region preference, and if it can't grant it, then it randomly chooses amongst
remaining fields. Adding a region of least preference would allow it to try to
exclude that region, narrowing the amount of fields left to choose from.

Implementing this fix would be 2 small steps:
1- add the region least preferred selection (requires db change too)
2- where the scheduler currently chooses a random field after preferred fields are
unavailable, make one more check for least preferred.

I see this as an easy step to make with high yeild for little work...

from leaguerunner.

dave0 avatar dave0 commented on August 11, 2024

Updated by tonysa13 on 2007-05-02T23:45:02

low priority

Original ticket set owner to tonysa13
Removed label Type-Defect
Removed label Priority-Medium
Added label Type-Enhancement
Added label Priority-Low

from leaguerunner.

dave0 avatar dave0 commented on August 11, 2024

Updated by tonysa13 on 2007-05-02T23:46:23

low priority

from leaguerunner.

dave0 avatar dave0 commented on August 11, 2024

"least preferred region" is probably not going to get implemented. Region selection may
get clobbered in favour of allowing teams to rank available fields in preferred order instead.

from leaguerunner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.