Drafting
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Drafting
by Accountancy » 15 Jun 2011, 03:48
How can you set up a custom draft? So far the only option is Juzamjedi's cube, I'd especially be interested in some functionality to pick each pack independently so I can draft my Future Sight-Onslaught-Odyssey draft!
Also especially in Scars of Mirrodin block draft, it would be nice if the computer picked more high quality cards for their decks, I played a draft and got passed Batterskull, Bonehoard, Wurmcoil Engine and Thopter Assembly, these cards really shouldn't be getting passed.
Also especially in Scars of Mirrodin block draft, it would be nice if the computer picked more high quality cards for their decks, I played a draft and got passed Batterskull, Bonehoard, Wurmcoil Engine and Thopter Assembly, these cards really shouldn't be getting passed.
- Accountancy
- Posts: 230
- Joined: 14 Aug 2009, 12:39
- Has thanked: 22 times
- Been thanked: 2 times
Re: Drafting
by juzamjedi » 15 Jun 2011, 16:02
My cube is set up with 2 files. You could create your own draft format in a similar way.
Step 1: open the deck editor and select all the cards you want in the draft pool and save as "FUT-ONS-ODY" or whatever you want to name it.
Step 2: go to your forge/res/drafts directory and find the file named Juzamjedi.draft. Save as a new file name.
Step 3: change the first 2 lines of the file to match your deck name from step 1. Line 3 of the file needs to become False; if you keep this as True then you will see way more Mythics and Rares than a normal pack would contain.
Re artifacts: yes, I agree that the current AI puts a lower value on artifacts than I would. The problem is coming up with a good algorithm that works for all sets. Do you have a suggestion?
Step 1: open the deck editor and select all the cards you want in the draft pool and save as "FUT-ONS-ODY" or whatever you want to name it.
Step 2: go to your forge/res/drafts directory and find the file named Juzamjedi.draft. Save as a new file name.
Step 3: change the first 2 lines of the file to match your deck name from step 1. Line 3 of the file needs to become False; if you keep this as True then you will see way more Mythics and Rares than a normal pack would contain.
Re artifacts: yes, I agree that the current AI puts a lower value on artifacts than I would. The problem is coming up with a good algorithm that works for all sets. Do you have a suggestion?
Re: Drafting
by Accountancy » 19 Jun 2011, 10:37
Unfortunately I have zero experience with programming, all I can think is some form of program that they AI weights it's picks based on converted mana cost/strength of card ratios, unfortunately most cards would need to have their strengths given as the AI would have a tough time deciding between Rampant Growth and Shock, but I imagine this would help the AI make most picks more intelligently... Still I don't know what is currently being implemented and what changes are feasible.
- Accountancy
- Posts: 230
- Joined: 14 Aug 2009, 12:39
- Has thanked: 22 times
- Been thanked: 2 times
Re: Drafting
by Hellfish » 20 Jun 2011, 11:29
I've thought about this a bit recently, maybe we can do something similar to what drafting sites like tappedout does. I think MagicWars did something similar as well.
Record the pick numbers that the human takes specific cards at and after a certain number of drafts send that data (with the users permission of course) to a web service somewhere ( I think this can be handled by a simple php service/ftp storage on a free webhost somewhere. Heliohost?) This server only serves to recieve such data until we are ready to release a beta, at which point we can tell it to average all that data (along with the previous beta's pick data) and let a developer download averaged pick data.
The pick data sent from the user would contain an integer list per card per block format(plus "Full" for full cardpool and custom drafts). The averaged pick data would contain 3 floats per card per block (Average Pick Number, Pick Number Sum, Total Amount of picks. Second and third floats are only used to create the next averaged data file). Data is separated by block format because well, Shatter for instance isn't nearly as useful outside Mirrodin drafting.
Record the pick numbers that the human takes specific cards at and after a certain number of drafts send that data (with the users permission of course) to a web service somewhere ( I think this can be handled by a simple php service/ftp storage on a free webhost somewhere. Heliohost?) This server only serves to recieve such data until we are ready to release a beta, at which point we can tell it to average all that data (along with the previous beta's pick data) and let a developer download averaged pick data.
The pick data sent from the user would contain an integer list per card per block format(plus "Full" for full cardpool and custom drafts). The averaged pick data would contain 3 floats per card per block (Average Pick Number, Pick Number Sum, Total Amount of picks. Second and third floats are only used to create the next averaged data file). Data is separated by block format because well, Shatter for instance isn't nearly as useful outside Mirrodin drafting.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Drafting
by Accountancy » 20 Jun 2011, 12:40
This seems very interesting, especially as it would produce a forge exclusive metagame for drafts as you would essentially be drafting against an AI hivemind of all our drafters.
- Accountancy
- Posts: 230
- Joined: 14 Aug 2009, 12:39
- Has thanked: 22 times
- Been thanked: 2 times
Re: Drafting
by Rob Cashwalker » 20 Jun 2011, 14:35
I think my next project will be to implement this pick tracking. We already have cardforge.org, now with unlimited bandwidth.
Each time the draft gui presents cards to the human, each card will start off with a score of 1. The human-picked card will get a score of 10. This bundle of data is then sent to the server.
I would just track the last 20 scores, using a query script to build the averaged data in real time. However I would wait a month before adding the drafting AI using it, plus a little GUI screen for users to download the latest draft data.
Eventually, we could apply some similar schemes to harvest human choices of targets for various spells.
Each time the draft gui presents cards to the human, each card will start off with a score of 1. The human-picked card will get a score of 10. This bundle of data is then sent to the server.
I would just track the last 20 scores, using a query script to build the averaged data in real time. However I would wait a month before adding the drafting AI using it, plus a little GUI screen for users to download the latest draft data.
Eventually, we could apply some similar schemes to harvest human choices of targets for various spells.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Drafting
by Hellfish » 20 Jun 2011, 17:40
Sounds great. I'll count the number of days til the AI becomes sentient 

So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
- Accountancy
- Posts: 230
- Joined: 14 Aug 2009, 12:39
- Has thanked: 22 times
- Been thanked: 2 times
Re: Drafting
by Rob Cashwalker » 21 Jun 2011, 14:45
yes... as long as humans keep drafting, the scores will keep changing.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
- Accountancy
- Posts: 230
- Joined: 14 Aug 2009, 12:39
- Has thanked: 22 times
- Been thanked: 2 times
Re: Drafting
by Rob Cashwalker » 22 Jun 2011, 13:43
I started a database, and I'm working on the PHP end first.
Should I set this up to upload picks as they are made, (each click of the Add button) or accumulate them locally and wait till the end to upload?
Should I set this up to upload picks as they are made, (each click of the Add button) or accumulate them locally and wait till the end to upload?
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Drafting
by friarsol » 22 Jun 2011, 14:01
It's a small data set, so maybe accumulate per pack? That way if you quit the draft because you misclicked it won't send that pick, but that way it will allow some picks to go through if you quit on the third pack.Rob Cashwalker wrote:I started a database, and I'm working on the PHP end first.
Should I set this up to upload picks as they are made, (each click of the Add button) or accumulate them locally and wait till the end to upload?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Drafting
by juzamjedi » 22 Jun 2011, 15:16
Aggregating draft picks is really awesome and I approve of this highly!
I will suggest just sending completed drafts or packs, whichever is easier to code. 1) it'll be fewer hits and 2) some people quit drafts during the middle for any number of reasons. Also be sure to let drafts continue working if a net connection is not present. Personally I draft Forge a lot on my laptop and I'm not always connected.
Would it be overkill or a good idea (TM) to collect draft picks according to draft format? A lot of cards are just good (TM) and won't be affected either way. Other cards are format dependent (example: Zendikar was a VERY fast draft environment where cards like Goblin Shortcutter were pretty good, and slow cards / Blue cards were pretty bad)
I will suggest just sending completed drafts or packs, whichever is easier to code. 1) it'll be fewer hits and 2) some people quit drafts during the middle for any number of reasons. Also be sure to let drafts continue working if a net connection is not present. Personally I draft Forge a lot on my laptop and I'm not always connected.
Would it be overkill or a good idea (TM) to collect draft picks according to draft format? A lot of cards are just good (TM) and won't be affected either way. Other cards are format dependent (example: Zendikar was a VERY fast draft environment where cards like Goblin Shortcutter were pretty good, and slow cards / Blue cards were pretty bad)
Re: Drafting
by Rob Cashwalker » 22 Jun 2011, 16:02
I have 3 pick averages in the database design. One for each draft mode, Full, Block and Custom. Each record in the table will relate to a particular printing of a card, so there will be different averages.
Cards are only added to the database if they've been uploaded... I don't want to get distracted trying to seed the database with one record for every printed card.
Once a local database is downloaded, the AI would first look for the cardname+current set record. If not found, then just the cardname; if multiple results, then average them together. Failing that, the AI will revert to other means of evaluation if a card is not present in the database.
The amount of data needing to be sent is a concern. There is a limit to the length of a URL. (the simplest way to get the data to a script is parameters in a URL) Sending for each pick would only represent data for 15 cards, then 14 cards, then 13 cards, etc. To accumulate a "pack's worth" of data would be ~120* cards. A full "draft's worth" of data would be ~360* cards. Either method would require uploading the data as a file... something that's much more complex in PHP.
* Approximate numbers, considering each 15-card pack (some sets had smaller packs or is a custom draft) is presented to the human twice, and a card may show up in another pack.
Of course I'm going to have to figure out upfront if the network isn't available...
Cards are only added to the database if they've been uploaded... I don't want to get distracted trying to seed the database with one record for every printed card.
Once a local database is downloaded, the AI would first look for the cardname+current set record. If not found, then just the cardname; if multiple results, then average them together. Failing that, the AI will revert to other means of evaluation if a card is not present in the database.
The amount of data needing to be sent is a concern. There is a limit to the length of a URL. (the simplest way to get the data to a script is parameters in a URL) Sending for each pick would only represent data for 15 cards, then 14 cards, then 13 cards, etc. To accumulate a "pack's worth" of data would be ~120* cards. A full "draft's worth" of data would be ~360* cards. Either method would require uploading the data as a file... something that's much more complex in PHP.
* Approximate numbers, considering each 15-card pack (some sets had smaller packs or is a custom draft) is presented to the human twice, and a card may show up in another pack.
Of course I'm going to have to figure out upfront if the network isn't available...
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Drafting
by juzamjedi » 22 Jun 2011, 17:47
Hmmm, it's been a few years since I played with PHP, but maybe this link will provide a good suggestion for uploading files instead of passing by query string?
http://stackoverflow.com/questions/1314 ... o-php-page
http://stackoverflow.com/questions/1314 ... o-php-page
Who is online
Users browsing this forum: No registered users and 49 guests