It is currently 27 Aug 2025, 23:48
   
Text Size

New Draft Functionality Finally Done

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: New Draft Functionality Finally Done

Postby Chris H. » 16 May 2011, 13:52

In message:

Re: Current Known Bugs list

Agetian wrote:No problem, thanks for fixing it Sloth! :) And about the second thing - well, AI does draft cards such as Sulfurous Springs in the draft mode - perhaps AI should resort to not drafting them or at least not using them in their decks and replacing them with generic basic lands instead if they are listed as NoAI?.. (just a little suggestion :)).
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New Draft Functionality Finally Done

Postby Agetian » 16 May 2011, 13:54

Rob Cashwalker wrote:when you're editing the deck, do you use the filters?
Umm not really, what I do is I open the deck in the editor (click "Deck Editor", then use "Open Draft", open the draft that I did), then just choose whatever cards I want, clicking "Add to Deck" to move the card to my deck, then I hit "Save", and then play. The editions are already messed up in the editor after loading to the deck editor though, it looks like the deck editor disregards the set info and chooses the newest edition that has the given card instead (at least that's what it looks like to me), then it just saves the wrong set info into the deck file (for instance, the cards that end up in the [sideboard] entry have no set info at all inside the .dck file after being edited with the deck editor). Unless there are any filters that are auto-applied when I start editing, nope, I don't use any filtering deliberately.
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: New Draft Functionality Finally Done

Postby Rob Cashwalker » 16 May 2011, 18:49

I must have forgotten to upload the change to the deck editor I made on my home copy. I just added the set code support in the draft edit mode, it should work now in the latest rev.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Impressive

Postby mtgrares » 16 May 2011, 19:25

Very impressive, people really want this feature. =D>
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: New Draft Functionality Finally Done

Postby juzamjedi » 16 May 2011, 20:07

Yes.

Honestly, drafting is my main usage of Forge. I've been drafting a bunch again now that the functionality is there :)
juzamjedi
Tester
 
Posts: 575
Joined: 13 Nov 2008, 08:35
Has thanked: 6 times
Been thanked: 8 times

Re: New Draft Functionality Finally Done

Postby Professor » 16 May 2011, 23:53

Can someone go over how to get the revision? I used to do it all the time, but my script stopped working some time in February. Or I can wait for the next full release. It can't be that far away!
-------------------------------------
PostCount=PostCount+1
User avatar
Professor
 
Posts: 172
Joined: 27 Jul 2009, 21:02
Has thanked: 0 time
Been thanked: 0 time

Re: New Draft Functionality Finally Done

Postby Agetian » 17 May 2011, 06:02

Rob Cashwalker wrote:I must have forgotten to upload the change to the deck editor I made on my home copy. I just added the set code support in the draft edit mode, it should work now in the latest rev.
Thanks for fixing it mate, I can confirm that it works correctly now. Great job, your awesome work on the draft mode is much appreciated! :)

Here are just a few observations I made regarding the AI drafting that maybe will be helpful to you in your future endeavors:

1) I noticed that the AI doesn't focus much on choosing specific colors when drafting and commonly drafts something of everything (possibly the best card it sees no matter the color? I don't know the algorithm so I'm not sure what happens exactly), and it doesn't try to strengthen its early play (at least it's my observation from, like, 7 or so drafts that I made over the past few days, playing with all the 7 opponents that were generated each time). In the end the AI commonly ends up with 4- or 5-colored decks (only very few decks are 2/3-colored, like one or two out of seven per draft) which it can't employ correctly because its early play is stuck. Four- or five-colored AI decks seem to, in most cases, end up being stuck early on in the game (it's not uncommon to see the AI do nothing except play various lands for the first 4 or even 5 or more turns) and once it finally gets to playing its creatures and spells the positional advantage I have by then is typically too overwhelming. The more focused, two- or three-color decks seem to play better for the AI as it seems to be better at the early play and transitioning into the mid-game with such decks cause it usually has some stuff to cast earlier on to hold off my earlier attacks and perhaps even create some early pressure (depending on what it has and what I have in hand). And also, it seems like generally speaking, 2-color or maybe 3-color (with good mana source micromanagement) decks with a good mana curve and with enough cards at CMC slots 1-4 and some late-game cards and finishers at CMC 5+ seem to play generally better than 5-color decks that do not have a particular focus and that generally have to rely on a high random factor (not only the player would have to get the cards that he would be able to employ both early in the game and later on, but also he would need to get the appropriate mana sources to actually cast those spells). By going 5-color, by the way, the AI also creates a massive disadvantage for itself against the landwalk cards - for instance, today I was able to beat the AI deck with my single swampwalk 3/3 Anaconda simply because the AI played a Swamp which it didn't actually use in any way (it was about turn 7 or so and it hasn't cast anything that required a black mana by then - and it only had one Swamp and something like 2 Mountain / 2 Forest / 1 Island plus a nonbasic land that provided UW or UB (can't remember which); for the same reason it wasn't able to cast much by turn 7 because probably whatever options it actually had in hand were inaccessible early on due to wrong mana colors). I'm not sure if it's just a subjective impression perhaps, maybe the AI was just terribly unlucky in most games I played against it (to be perfectly honest, I haven't found time yet to actually analyze the decks the AI creates when drafting - the draft mode is just way too addictive for me for now to actually do something like that :)). At any rate, I keep drafting every day, so I'll keep observing what's going on. I know that it's very difficult to come up with a solid, strong drafting AI, so I wish you the best of luck in improving the algorithms should you choose to do it! :)

2) The AI drafts cards that it can't correctly use and then puts them into the deck. This leads to a bigger number of glitches than in regular random or quest games, because the AI will put, for instance, pain lands into its deck and then it'll use them without getting hurt (someone over at the buglist thread pointed out that it's a known fact that the AI can't and shouldn't use pain lands for now cause it just can't). To tell the truth, I'm not sure what can be done here, cause if the AI drafts them but then doesn't put them into the deck, it might create a disadvantage for the AI as it will draft potentially useless cards for itself... Perhaps it should only resort to drafting cards that it can use in the first place then?... As more cards get supported (I believe there's some kind of a flag that tells which cards the AI can and can't use), the AI drafting will also improve on its own cause it'll be able to add more and more cards to its arsenal over time? This, of course, leads to the problem - what should happen when only the no-AI cards are remaining in the draft pool?... Oh well, unfortunately, this is a puzzle I was unable to resolve, so I'm afraid I don't have a very good suggestion here, sorry...

EDIT: Perhaps the second drawback can be improved by a little more prioritization of what the AI drafts and puts into the deck. I was thinking about the algorithm along these lines (simplified and not perfect, but might be something to think about if you haven't considered it yet): When drafting, the AI should look if there are cards to draft that are not marked as NoAI. If there are, it should draft the best card from those (using whatever algorithm it's using to decide which card is the best). If all the cards from which to draft are marked as NoAI, it should as a last resort option draft the best card from those, using once again its algorithm to determine what is best. When deckbuilding, the AI should try to complete its deck using the cards that were drafted and that do not have the NoAI flag set. As such, it should prirotize any nonbasic or basic land that does not have the NoAI flag over a nonbasic land that has the NoAI flag, etc. If all the working cards are exhausted but the deck is still not complete, then the AI should try, as a last resort option, to complete the deck with the remaining NoAI cards that it has. Feel free to ignore any of it, just my $0.02. :)

At any rate, even the current level of AI drafting is massively fun, enjoyable, and impressive, congratulations on this important breakthrough and good luck in your future work on this awesome mode! :) Please don't take anything here as an unwarranted criticism or anything, I'm merely trying to be helpful and provide some feedback based on my experience and impressions. :)
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: New Draft Functionality Finally Done

Postby Rob Cashwalker » 17 May 2011, 14:02

Thanks Agetian, for the extensive testing.

I had posted the current algorithm a few posts ago. It is by no means good. However it was significantly better than the original that rares had written.

I spent roughly 2 months (an hour here, and hour there) with my local code base frozen, so that I could work on the entire draft revision. During that time I knew the other devs had been working on revising the SVars. I wasn't sure what the new SVars were, while I was working on that part, so I just left it out. I wasn't sure just how big an impact it would even have for the AI.

The computer tries its hardest to pick from only 2 colors, but eventually the packs run dry, so it will be forced to pick from other colors plus Artifacts or Lands. Each computer player picks its colors without knowing what the other computer players picked. (the old method had the colors picked before the AI saw the cards, and each player picked a color-combo that none of the other players picked) The 2 "best" creatures in the first 2 picks determine the colors.

Building the deck from the picked cards is also significantly better than it once was, though I do admit I threw it together as I just wanted to be done with the revision by then. What may happen is that it tries to build the deck from its colors first, but if it doesn't have enough cards, then it picks randomly from the remaining cards. While the AI may be forced to pick NoAI cards, I certainly should make sure to add a check in deck construction.

I have already begun a similar overhaul of the sealed deck mode. The existing implementation doesn't actually allow you to build your deck from the card pool unless you create the card pool in the deck editor. I'm giving it the same initialization from the Draft mode, to choose the format and then choose the master card pool. I have the whole thing working for the human, so my next step is adapting the deck builder to a sealed pool.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: New Draft Functionality Finally Done

Postby Chris H. » 17 May 2011, 14:21

We do appreciate your hard work Rob. :)

Sloth and I did some initial work on the SVars but this is a work in progress, much like your draft and sealed decks modes.

"SVar:RemAIDeck:True" should be avoided by the AI if at all possible.

"SVar:RemRandomDeck:True" is used to determine combo type cards. Odds are good that the AI might have some code to use the cards but there may not be cards in the computer's card pool that will provide a good match.

Some cards but not all will have both SVars.

I have also spent some time trying to add a new key + value to ReadCard, the idea being that we could move the notes out of the text field and put it into a separate field. I have only had partial success at this and it did not work well enough to submit. I must be missing something.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: New Draft Functionality Finally Done

Postby Agetian » 17 May 2011, 14:25

@ Rob Cashwalker: you're very welcome, your effort is much appreciated, Rob! Thanks a lot for all your efforts and thanks for finding my testing useful! :)
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: New Draft Functionality Finally Done

Postby Agetian » 18 May 2011, 05:37

Here's a draft mode-related bug that I encountered today, I made a detailed report in the Bug Reports thread but I thought I should also post the most relevant information here:

I did a Legends draft (LEG/LEG/LEG) and then tried to open my Draft deck in the Deck Editor, and it crashed with an error. I was able to get down to the reason for this bug, the reason is that the draft code assigns the Legends set to the Plains/Island/Swamp/etc. but such cards do not exist in the Legends set, so the game fails to draw the picture or something. Changing the edition code for the basic lands from LEG to 5ED or something like that fixes the issue. Perhaps it's possible to somehow set the basic lands for the LEG/LEG/LEG draft to something that's closest to the Legends set (I'm not sure what it'll be - 4th ed, 5th ed, 6th ed?... can't remember when Legends came to be).
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: New Draft Functionality Finally Done

Postby slapshot5 » 18 May 2011, 14:16

Agetian wrote:Here's a draft mode-related bug that I encountered today, I made a detailed report in the Bug Reports thread but I thought I should also post the most relevant information here:

I did a Legends draft (LEG/LEG/LEG) and then tried to open my Draft deck in the Deck Editor, and it crashed with an error. I was able to get down to the reason for this bug, the reason is that the draft code assigns the Legends set to the Plains/Island/Swamp/etc. but such cards do not exist in the Legends set, so the game fails to draw the picture or something. Changing the edition code for the basic lands from LEG to 5ED or something like that fixes the issue. Perhaps it's possible to somehow set the basic lands for the LEG/LEG/LEG draft to something that's closest to the Legends set (I'm not sure what it'll be - 4th ed, 5th ed, 6th ed?... can't remember when Legends came to be).
Legends was during Unlimited mostly.
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: New Draft Functionality Finally Done

Postby Rob Cashwalker » 18 May 2011, 16:46

Thanks. I'll have to see what we can do about that. I'm likely to be moving the set data to an external file more similar to the custom draft files, which will allow the draft to assign an appropriate land set code, instead of assuming it's the first set in a block.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: New Draft Functionality Finally Done

Postby eljinete7 » 21 May 2011, 00:07

I've just finished one UDS/ULG/USG draft (...ah, the old times) against the other 7 Forge's AI players and I'd like to say it's a totally addictive new game mode. An awesome great great work! 8)
User avatar
eljinete7
 
Posts: 66
Joined: 15 Nov 2009, 22:42
Has thanked: 5 times
Been thanked: 0 time

Re: New Draft Functionality Finally Done

Postby Rob Cashwalker » 26 May 2011, 03:15

I just added filtering for the RemAIDeck. It avoids choosing them during the draft. It then avoids building its deck with any of them as well.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

PreviousNext

Return to Forge

Who is online

Users browsing this forum: No registered users and 48 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 48 users online :: 0 registered, 0 hidden and 48 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 48 guests

Login Form