samwyse wrote:
On Apr 15, 8:13 am, Aaron Brady wrote:
On Apr 15, 6:57 am, samwyse wrote:
Here's my idea: generate all possible pairs:
import itertools
players = [chr(c) for c in xrange(ord('a'),ord('z')+1)]
all_pairs = list(itertools.combinations(players,2))
partition the list:
def choos
On Apr 15, 11:29 am, samwyse wrote:
> On Apr 15, 8:56 am, Aaron Brady wrote:
>
>
>
> > The randomizing solution isn't quite suitable for 16 teams. With 5
> > teams/1 court, and 5 teams/2 courts, 6 teams/2 courts, the solution
> > comes within seconds. For 7 teams/3 courts, the solution takes a
On Apr 15, 8:56 am, Aaron Brady wrote:
>
> The randomizing solution isn't quite suitable for 16 teams. With 5
> teams/1 court, and 5 teams/2 courts, 6 teams/2 courts, the solution
> comes within seconds. For 7 teams/3 courts, the solution takes a few
> minutes.
7 teams/3 courts is the same as 8
On Apr 15, 8:13 am, Aaron Brady wrote:
> On Apr 15, 6:57 am, samwyse wrote:
>
> > Here's my idea: generate all possible pairs:
>
> > >>> import itertools
> > >>> players = [chr(c) for c in xrange(ord('a'),ord('z')+1)]
> > >>> all_pairs = list(itertools.combinations(players,2))
>
> > partition th
On Apr 14, 9:45 pm, Ross wrote:
> On Apr 14, 7:18 pm, Aaron Brady wrote:
>
>
>
> > On Apr 14, 7:01 pm, Aaron Brady wrote:
>
> > > On Apr 14, 12:37 pm, Ross wrote:
>
> > > > On Apr 14, 10:34 am, Ross wrote:
>
> > > > > On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote:
>
> > > > > > In arti
On Apr 15, 6:57 am, samwyse wrote:
> On Apr 14, 7:01 pm, Aaron Brady wrote:
>
> > Here is an idea. Create a list of all possible pairs, using
> > itertools.combinations. You'll notice everyone gets equal play time
> > and equal time against each other on a pair-by-pair basis. Then, call
> > ra
On Apr 14, 7:01 pm, Aaron Brady wrote:
> Here is an idea. Create a list of all possible pairs, using
> itertools.combinations. You'll notice everyone gets equal play time
> and equal time against each other on a pair-by-pair basis. Then, call
> random.shuffle until one player isn't playing on t
On Apr 14, 9:45 pm, Ross wrote:
> On Apr 14, 7:18 pm, Aaron Brady wrote:
>
>
>
> > On Apr 14, 7:01 pm, Aaron Brady wrote:
>
> > > On Apr 14, 12:37 pm, Ross wrote:
>
> > > > On Apr 14, 10:34 am, Ross wrote:
>
> > > > > On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote:
>
> > > > > > In arti
On Apr 14, 7:18 pm, Aaron Brady wrote:
> On Apr 14, 7:01 pm, Aaron Brady wrote:
>
>
>
> > On Apr 14, 12:37 pm, Ross wrote:
>
> > > On Apr 14, 10:34 am, Ross wrote:
>
> > > > On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote:
>
> > > > > In article
> > > > > ,
>
> > > > > Ross wrote:
> >
On Apr 14, 7:01 pm, Aaron Brady wrote:
> On Apr 14, 12:37 pm, Ross wrote:
>
>
>
> > On Apr 14, 10:34 am, Ross wrote:
>
> > > On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote:
>
> > > > In article
> > > > ,
>
> > > > Ross wrote:
> > > > >On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) w
On Apr 14, 12:37 pm, Ross wrote:
> On Apr 14, 10:34 am, Ross wrote:
>
>
>
> > On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote:
>
> > > In article
> > > ,
>
> > > Ross wrote:
> > > >On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) wrote:
> > > >> In article
> > > >> > > >com>,
> > > >>
On Apr 14, 10:34 am, Ross wrote:
> On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote:
>
>
>
> > In article
> > ,
>
> > Ross wrote:
> > >On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) wrote:
> > >> In article
> > >> > >com>,
> > >> Ross =A0 wrote:
>
> > >>>I'm sorry...my example was pro
On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote:
> In article ,
>
>
>
> Ross wrote:
> >On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) wrote:
> >> In article >com>,
> >> Ross =A0 wrote:
>
> >>>I'm sorry...my example was probably a bad one. A better example of
> >>>output I would like wou
In article ,
Ross wrote:
>On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) wrote:
>> In article com>,
>> Ross =A0 wrote:
>>>
>>>I'm sorry...my example was probably a bad one. A better example of
>>>output I would like would be something like [[1,2],[3,4],[5,6]] and
>>>then for the leftovers list
On Apr 13, 11:52 pm, Aaron Brady wrote:
> On Apr 13, 10:04 am, Ross wrote:
>
>
>
> > On Apr 11, 1:10 pm, a...@pythoncraft.com (Aahz) wrote:
>
> > > In article
> > > <4fd78ac3-ba83-456b-b768-3a0043548...@f19g2000vbf.googlegroups.com>,
>
> > > Ross wrote:
>
> > > >I'm trying to design an iterato
On Apr 13, 10:04 am, Ross wrote:
> On Apr 11, 1:10 pm, a...@pythoncraft.com (Aahz) wrote:
>
>
>
> > In article
> > <4fd78ac3-ba83-456b-b768-3a0043548...@f19g2000vbf.googlegroups.com>,
>
> > Ross wrote:
>
> > >I'm trying to design an iterator that produces two lists. The first
> > >list will be
On Apr 13, 9:08 am, a...@pythoncraft.com (Aahz) wrote:
> In article ,
>
> Ross wrote:
>
> >I'm sorry...my example was probably a bad one. A better example of
> >output I would like would be something like [[1,2],[3,4],[5,6]] and
> >then for the leftovers list [7,8,9,10 etc]. What I'm trying to do
In article ,
Ross wrote:
>
>I'm sorry...my example was probably a bad one. A better example of
>output I would like would be something like [[1,2],[3,4],[5,6]] and
>then for the leftovers list [7,8,9,10 etc]. What I'm trying to do is
>produce some sort of round robin algorithm for tennis that is
On Apr 11, 1:10 pm, a...@pythoncraft.com (Aahz) wrote:
> In article
> <4fd78ac3-ba83-456b-b768-3a0043548...@f19g2000vbf.googlegroups.com>,
>
> Ross wrote:
>
> >I'm trying to design an iterator that produces two lists. The first
> >list will be a list of unique pairings and the second will be a l
In article <4fd78ac3-ba83-456b-b768-3a0043548...@f19g2000vbf.googlegroups.com>,
Ross wrote:
>
>I'm trying to design an iterator that produces two lists. The first
>list will be a list of unique pairings and the second will be a list
>of items that weren't used in the first list. After each round,
Ross writes:
> Can you guys suggest an approach to this problem...I'm trying to teach
> myself python so an outline of how to approach this would probably be
> more helpful to me than an explicit solution. I'll cry mercy if I
> can't figure it out after your hints.
Look at the "set" datatype. Th
I'm trying to design an iterator that produces two lists. The first
list will be a list of unique pairings and the second will be a list
of items that weren't used in the first list. After each round, the
items that weren't used in the round before will get put back in and
the second list will be p
22 matches
Mail list logo