Page 1 of 1

Draft picks: values

PostPosted: 07 Jan 2018, 20:46
by singalen
Hello gentlemen,

First, thanks to all the developers for the fantastic work. Manalink is my old love.

I find booster draft decks AI builds unsatisfactory, though. I get 1st-pick cards in 8th pick, for example.

I once tried to build a software to do the picks. Here it is: github / singalen / virtualdrafter.
It utilizes the other deck to calculate pick's value in the context of existing picks, or, at the same time, adjust the value of new picks like this:
Code: Select all
Sachi, Daughter of Seshiro 0.6+CountBy(SubType,Snake,0.03)+CountBy(SubType,Shaman,0.03)
Particularly card values may be reused: virtualdrafter/tree/master/data/values.dat
I paid a great deal of attention to extracting the values from pro reviews and tuning them.

Do you think this can be of some use?

Re: Draft picks: values

PostPosted: 09 Jan 2018, 09:17
by Aswan jaguar
Hello singalen, thanks for sharing your work.
Draft is my favorite game play. I don't know how cards are currently picked by AI and if your method is better or not, hopefully foolosopher who develops draft will check this when he revisits.
Your work is not in a form of a patch so that I can test it right?

Re: Draft picks: values

PostPosted: 10 Jan 2018, 00:37
by singalen
Nope, it was a standalone program. I don't have a binary and all the data to run it now, sadly.
I tried adding my Odissey values to current Manalink's draft values file. The results seemed to be better, but not as much as I expected. Maybe it's my values are not that good, or maybe it's because the current Manalink draft doesn't preserve color balance in a booster? (AFAIK, the colors were not evenly distributed only in Torment/Judgement sets).

Re: Draft picks: values

PostPosted: 11 Jan 2018, 23:49
by foolosopher
Hi, just noticed the topic, good to see that people are still interested in this. Just for the history, I think Jatill, if I remember correctly, was the first one who developed draft. I picked up after Mok came back shortly some years ago and helped us overcome the initial 2000 card limit. I then added the rarity reading from the rarity.dat file, some more logic and a lot of checks as most sets where not whole and could not properly support rarity and especially singleton draft. Tried to keep pace for a short while with Korath (couldn't do it even by a longshot :-) and added a few more dynamic reading of some data and finally the gui (in gtk2) , while Korath also put some automated reading and optimized the code a bit. Unfortunately couldn't add the gui code into the main branch as the makefile used by Korath was too complex for me.

Anyway, took a look at your readme (thanks to google translate) but the logic seems different from the manalink data in the sense that your KnowledgeType does not exist in the Manalink.csv which is the data source for the card attributes. In manalink.csv there are the card types and subtypes that you could probably use for selection filtering, but current draft only uses AI Base Value from Manalink.csv to get the higher rating cards and the first picks also determine the deck colours afterwards. Existing code only tries to create up to two coloured decks.
Each pack with rarity enforcement contains 1R +3U +11C.
After the card selection the mana sources are selected based on the number of the selected coloured cards.

The draft code is in C as most of the manalink. In Manalink there are also some bits in assembly and a little bit in CPP. If you have any of the manalink patches there is a folder named "src" where you can find the code of that patch including that of draft.
Attached you can find the draft code from the latest manalink patch EMNv2.
Will try to take a look at your code, but in case you are interested maybe you can do a port of your code into manalink, I could probably help you with that. Would be nice to get an update if only for draft.

Re: Draft picks: values

PostPosted: 12 Jan 2018, 03:13
by singalen
Thanks! Overloaded now, but will take a look ASAP.