*** VD 13 Commentary Thread ***
Collapse
X
-
If DMT didn't exist we would have to invent it. There has to be a weirdest thing. Once we have the concept weird, there has to be a weirdest thing. And DMT is simply it.
- Terence McKenna
Bullshit is everywhere. - George Carlin (& Jon Stewart)
How old would you be if you didn't know how old you are? - Satchel PaigeComment
-
I think we stopped because it added an extra two or three days to the draft start, waiting for some straggler to pick their draft slot."Jesus said to them, 'Truly I tell you, the tax collectors and the prostitutes are going into the kingdom of God ahead of you.'"Comment
-
---------------------------------------------
Champagne for breakfast and a Sherman in my hand !
---------------------------------------------
The Party told you to reject the evidence of your eyes and ears. It was their final, most essential command.
George Orwell, 1984
Comment
-
Comment
-
---------------------------------------------
Champagne for breakfast and a Sherman in my hand !
---------------------------------------------
The Party told you to reject the evidence of your eyes and ears. It was their final, most essential command.
George Orwell, 1984
Comment
-
I was thinking at some point it would be fun to do a round of KO's to start the draft. Some players are too valuable in certain formats, maybe in all formats---------------------------------------------
Champagne for breakfast and a Sherman in my hand !
---------------------------------------------
The Party told you to reject the evidence of your eyes and ears. It was their final, most essential command.
George Orwell, 1984
Comment
-
---------------------------------------------
Champagne for breakfast and a Sherman in my hand !
---------------------------------------------
The Party told you to reject the evidence of your eyes and ears. It was their final, most essential command.
George Orwell, 1984
Comment
-
"Jesus said to them, 'Truly I tell you, the tax collectors and the prostitutes are going into the kingdom of God ahead of you.'"Comment
-
I always think its fun to submit a draft order preference like NFBC does. I have a deterministic algorithm I have used in leagues that have played with this rule. Basically the algorithm tries to give each player the best draft pick it can based on their ordered preferences.Comment
-
TSQL algorithm:
USE [Baseball]
GO
/****** Object: StoredProcedure [dbo].[SetOrder] Script Date: 12/28/2018 12:16:40 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[SetOrder]
@leagueID int = null,
@setvalues bit = 0
AS
BEGIN
if @LeagueID is null select @LeagueID = LeagueID from PrimaryLeague
--table to hold the ORDER of the draft. After completion this will show you the draft order
declare @order table
(
choice int,
fantasyteamid int null
)
--insert a record for each draft position
declare @i int = 1
while @i <= (select count(distinct fantasyteamid) from [ChoiceOrder] where fantasyteamid in (select fantasyteamid from [dbo].[FantasyTeams] where leagueid = @leagueID))
begin
insert into @order (choice) select @i
set @i = @i + 1
end
--temp work table to hold data about the teams and their choices
declare @workingtable table
(
fantasyteamid int,
choice int,
choiceorder int,
seed int
)
set @i = 1
select 'inputs'
select t.TeamName, nco.ChoiceOrder, nco.Choice from [ChoiceOrder] nco
inner join [FantasyTeams] t
on t.fantasyteamid = nco.fantasyteamid
where t.fantasyteamid in (select fantasyteamid from [dbo].[FantasyTeams] where leagueid = @leagueID)
order by nco.fantasyteamid, nco.ChoiceOrder
while exists (select choice from @order where fantasyteamid is null) -- loop until all choices are set
begin
select 'pass number ' + convert(varchar(10), @i)
set @i = @i + 1
--clear out the work table
delete from @workingtable
--add a record for each team's selections that have not been taken
insert into @workingtable
select fantasyteamid, choice, choiceorder, 0
from [dbo].[ChoiceOrder]
where choice not in (select choice from @order where fantasyteamid is not null)
and fantasyteamid not in (select isnull(fantasyteamid, 0) from @order)
and fantasyteamid in (select fantasyteamid from [dbo].[FantasyTeams] where leagueid = @leagueID)
--set an initial seed value - use each team's first remaining pick
update @workingtable
set seed = w1.seed + w2.choice
from @workingtable w1
inner join (select * from @workingtable) w2
on w2.fantasyteamid = w1.fantasyteamid
left outer join (select * from @workingtable) w3
on w3.fantasyteamid = w1.fantasyteamid
and w3.choiceorder < w2.choiceorder
where w3.fantasyteamid is null --left join null here means there is no choice with a smaller choiceorder for each team
--add to the seed each team's LAST choice
update @workingtable
set seed = w1.seed + w2.choice
from @workingtable w1
inner join (select * from @workingtable) w2
on w2.fantasyteamid = w1.fantasyteamid
left outer join (select * from @workingtable) w3
on w3.fantasyteamid = w1.fantasyteamid
and w3.choiceorder > w2.choiceorder
where w3.fantasyteamid is null --left join null here means there is no choice with a larger choiceorder for each team
--remove all but the top choice (smallest choiceorder) for each team
delete @workingtable
from @workingtable w1
left outer join (select * from @workingtable) w3
on w3.fantasyteamid = w1.fantasyteamid
and w3.choiceorder < w1.choiceorder
where w3.fantasyteamid is not null --left join null here means there is no choice with a smaller choiceorder for each team
select 'Top Preferences'
select t.TeamName, w.choice, w.choiceorder, w.seed from @workingtable w
inner join [FantasyTeams] t
on t.fantasyteamid = w.fantasyteamid
order by w.fantasyteamid
select 'Ties:'
select t.TeamName, main.choice, main.choiceorder,
t2.TeamName as tiedfantasyteamid,
tied.choice as tiedChoice,
tied.choiceorder as tiedChoiceOrder,
mynextchoice.minorder as mynextorder,
othernextchoice.minorder as tiednextorder
from @workingtable main
inner join [FantasyTeams] t
on t.fantasyteamid = main.fantasyteamid
inner join @workingtable tied
on main.choice = tied.choice
and main.fantasyteamid <> tied.fantasyteamid
inner join [FantasyTeams] t2
on t2.fantasyteamid = tied.fantasyteamid
left outer join (
select ct1.fantasyteamid, min(ct1.choiceorder) as minorder
from [ChoiceOrder] ct1
inner join @order o1
on ct1.Choice = o1.choice
and o1.fantasyteamid is null
left outer join @workingtable wt1
on wt1.choice = ct1.Choice
where wt1.choice is null
group by ct1.fantasyteamid
) as mynextchoice
on mynextchoice.fantasyteamid = main.fantasyteamid
left outer join (
select ct2.fantasyteamid, min(ct2.choiceorder) as minorder
from [ChoiceOrder] ct2
inner join @order o2
on ct2.Choice = o2.choice
and o2.fantasyteamid is null
left outer join @workingtable wt2
on wt2.choice = ct2.Choice
where wt2.choice is null
group by ct2.fantasyteamid
) as othernextchoice
on othernextchoice.fantasyteamid = tied.fantasyteamid
order by 1
--remove from the workingtable teams that are tied with another team on choice but have a higher choiceorder for that choice
delete @workingtable
from @workingtable wt
inner join (select * from @workingtable) wt2
on wt.choice = wt2.choice
and wt.fantasyteamid <> wt2.fantasyteamid
and wt.choiceorder > wt2.choiceorder
--remove teams that have a smaller NEXT choiceorder than a team they are tied with
delete @workingtable
from @workingtable wt
inner join (select * from @workingtable) wt2
on wt.choice = wt2.choice
and wt.fantasyteamid <> wt2.fantasyteamid
inner join (
select ct1.fantasyteamid, min(ct1.choiceorder) as minorder
from [ChoiceOrder] ct1
inner join @order o1
on ct1.Choice = o1.choice
and o1.fantasyteamid is null
left outer join @workingtable wt1
on wt1.choice = ct1.Choice
where wt1.choice is null
group by ct1.fantasyteamid
) as mynextchoice
on mynextchoice.fantasyteamid = wt.fantasyteamid
inner join (
select ct2.fantasyteamid, min(ct2.choiceorder) as minorder
from [ChoiceOrder] ct2
inner join @order o2
on ct2.Choice = o2.choice
and o2.fantasyteamid is null
left outer join @workingtable wt2
on wt2.choice = ct2.Choice
where wt2.choice is null
group by ct2.fantasyteamid
) as othernextchoice
on othernextchoice.fantasyteamid = wt2.fantasyteamid
and othernextchoice.minorder > mynextchoice.minorder
--for those teams that are the only one left who has chosen a specific choice
--go ahead and update the final order
update @order
set fantasyteamid = wt.fantasyteamid
from @order o
inner join @workingtable wt
on wt.choice = o.choice
left outer join @workingtable wt2
on wt2.choice = wt2.choice
and wt2.fantasyteamid <> wt.fantasyteamid
where wt2.fantasyteamid is null
--remove choices and teams that have been selected
delete from @workingtable
where choice in (select choice from @order where fantasyteamid is not null)
or fantasyteamid in (select isnull(fantasyteamid, 0) from @order)
--now break ties
update @order
set fantasyteamid = ranks.fantasyteamid
from
@order o
inner join -- join in a seeding rank - "randomly" selected based on the seeds of the teams that are tied
(select choice, sum(seed) % count(fantasyteamid) + 1 as seedrank
from @workingtable
group by choice) as seeds
on seeds.choice = o.choice
inner join -- join in the team ranks with the common choice - i.e. the first of the series with the same choice will have rank 1, then 2, etc
(select fantasyteamid, choice, rank() over (partition by choice order by fantasyteamid) as rnk
from @workingtable) as ranks
on ranks.rnk = seeds.seedrank
and ranks.choice = seeds.choice
where o.fantasyteamid is null
select 'Orders Set'
select o.choice, nt.FantasyTeamID, nt.TeamName, co.ChoiceOrder
from @order o
inner join [FantasyTeams] nt
on nt.fantasyteamid = o.fantasyteamid
inner join ChoiceOrder co
on co.fantasyteamid = nt.fantasyteamid
and co.Choice = o.choice
order by 1
end
if @setvalues = 1
begin
insert into [dbo].[ThrowOrder] (leagueID, fantasyteamid, throworder)
select @leagueID, fantasyteamid, choice
from @order
end
select (sum(co.choiceorder) * 1.0)/(count(co.choiceorder) * 1.0)
from @order o
inner join [FantasyTeams] nt
on nt.fantasyteamid = o.fantasyteamid
inner join ChoiceOrder co
on co.fantasyteamid = nt.fantasyteamid
and co.Choice = o.choice
ENDComment
-
Dare I say it, VD auction?If DMT didn't exist we would have to invent it. There has to be a weirdest thing. Once we have the concept weird, there has to be a weirdest thing. And DMT is simply it.
- Terence McKenna
Bullshit is everywhere. - George Carlin (& Jon Stewart)
How old would you be if you didn't know how old you are? - Satchel PaigeComment
Comment