Card AI (Improvements) Requests
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card AI (Improvements) Requests
by RedDevil13 » 26 Jan 2016, 12:28
I have noticed the AI will tap a pain land for colored mana, even when it is casting a colorless (artifact) spell. AI just played a turn 1 Llanowar Wastes and tapped it for pain to play a Ghostfire Blade. Following turn played a Reaver Drone with the Llanowar Wastes, played a Caves of Koilos and again tapped for pain to equip the creature.
I'm sure the new colorless mechanic has complicated this stuff for you guys.
I'm sure the new colorless mechanic has complicated this stuff for you guys.
- RedDevil13
- Posts: 19
- Joined: 08 Dec 2015, 15:41
- Has thanked: 0 time
- Been thanked: 2 times
Re: Card AI (Improvements) Requests
by horseoftroy » 30 Jan 2016, 07:02
Thanks for the great work with this fantastic MTG card game
I have found big drawing mistakes by AI
Please enhance those AI's drawing cards flaws
Obvious mistakes by AI :
1 - Cards function (Draw X [or number like 2 or 3] cards then Discard X cards)
Mistake -
The AI use this type of cards in situations if (has X cards or less in hand only)
Result -
This ends up with AI's hand discarded ALL cards it holds
Solution -
Please make the AI notice that NEVER use this type of cards before it holds (X+1) cards in its hand
Example -
Creature : Salvage Drone , Bonded Fetch
Planeswalker : Dack Fayden
Enchantment : Attunement
Instant : Catalog
Land : Bazaar Of Baghdad , Desolate Lighthouse
2 - Cards function (Discard X [or number like 2 or 3] cards then Draw X [or number like 2 or 3] cards)
Mistake -
The AI use this type of cards in situations if (has EXACTLY X cards in hand only)
Solution -
Please make the AI notice that NEVER use this type of cards before it holds (X+1) cards in its hand
Thanks for the great game and I'm sorry if I did any mistake
I have found big drawing mistakes by AI
Please enhance those AI's drawing cards flaws
Obvious mistakes by AI :
1 - Cards function (Draw X [or number like 2 or 3] cards then Discard X cards)
Mistake -
The AI use this type of cards in situations if (has X cards or less in hand only)
Result -
This ends up with AI's hand discarded ALL cards it holds
Solution -
Please make the AI notice that NEVER use this type of cards before it holds (X+1) cards in its hand
Example -
Creature : Salvage Drone , Bonded Fetch
Planeswalker : Dack Fayden
Enchantment : Attunement
Instant : Catalog
Land : Bazaar Of Baghdad , Desolate Lighthouse
2 - Cards function (Discard X [or number like 2 or 3] cards then Draw X [or number like 2 or 3] cards)
Mistake -
The AI use this type of cards in situations if (has EXACTLY X cards in hand only)
Solution -
Please make the AI notice that NEVER use this type of cards before it holds (X+1) cards in its hand
Thanks for the great game and I'm sorry if I did any mistake
- horseoftroy
- Posts: 46
- Joined: 17 Jan 2014, 16:00
- Has thanked: 222 times
- Been thanked: 9 times
Re: Card AI (Improvements) Requests
by slyfox7777777 » 02 Feb 2016, 14:52
I'm sure everyone's already aware of this, but it's starting to annoy me a bit: all of the card ratings for the split cards in DGM draft are set to 500, so the AI never picks them, and they always wheel, even the first-pickable ones. Is this just because the AI can't use them? I'm just wondering if there's something you can do to make that draft format a little more functional.
Anyways, thanks so much for this great program. It's pretty much my life
Anyways, thanks so much for this great program. It's pretty much my life
- slyfox7777777
- Posts: 23
- Joined: 26 Mar 2014, 18:26
- Has thanked: 1 time
- Been thanked: 0 time
Re: Card AI (Improvements) Requests
by friarsol » 02 Feb 2016, 15:36
Looks like there was just a mismatch between the names in the rankings file (which we get from an external source) and how we name cards in Forge. If a ranking is 500 it's because that card wasn't found in the rankings. There's some logic for cards the AI can't play where it'll still draft them, just not as high as normal since it's unable to use them, but that doesn't change the actual ranking.slyfox7777777 wrote:I'm sure everyone's already aware of this, but it's starting to annoy me a bit: all of the card ratings for the split cards in DGM draft are set to 500, so the AI never picks them, and they always wheel, even the first-pickable ones. Is this just because the AI can't use them? I'm just wondering if there's something you can do to make that draft format a little more functional.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card AI (Improvements) Requests
by slyfox7777777 » 04 Feb 2016, 01:40
Does anyone think that they can explain to me how the ranking system works for draft? I see that in the draft folder of the res there's a rankings file which seems to have a pick order for every format, but the ranking system which comes up when you go into an actual draft and look at that category is some completely different number which ranks from 0.0001 (best) to 1.0 (worst,) and seems to have absolutely nothing to do with the rank list. Some of the 0 to 1 rankings of some of the drafts are just terrible, such as, in Origins, you can consistently get any of the flip planeswalkers very late or even wheel them (they are ranked around .75 if I remember correctly, even though almost all of them land very high on the text ranking list,) Vintage Masters has no rankings at all, and Tempest Remastered just generally has some very good cards listed as .97 or near that.
Is there any chance that there is some sort of improvement to this system in the works, or is there something I can do manually to change the pick orders to my liking?
Is there any chance that there is some sort of improvement to this system in the works, or is there something I can do manually to change the pick orders to my liking?
- slyfox7777777
- Posts: 23
- Joined: 26 Mar 2014, 18:26
- Has thanked: 1 time
- Been thanked: 0 time
Re: Card AI (Improvements) Requests
by friarsol » 04 Feb 2016, 02:46
Here's how the rankings work:slyfox7777777 wrote:Does anyone think that they can explain to me how the ranking system works for draft? I see that in the draft folder of the res there's a rankings file which seems to have a pick order for every format, but the ranking system which comes up when you go into an actual draft and look at that category is some completely different number which ranks from 0.0001 (best) to 1.0 (worst,) and seems to have absolutely nothing to do with the rank list. Some of the 0 to 1 rankings of some of the drafts are just terrible, such as, in Origins, you can consistently get any of the flip planeswalkers very late or even wheel them (they are ranked around .75 if I remember correctly, even though almost all of them land very high on the text ranking list,) Vintage Masters has no rankings at all, and Tempest Remastered just generally has some very good cards listed as .97 or near that.
Is there any chance that there is some sort of improvement to this system in the works, or is there something I can do manually to change the pick orders to my liking?
We grab from an external source (draft.bestiaire.org) the rankings they have collated of where people have drafted cards. If they don't have the rankings (like in the case of VMA and TPR) we just don't have any rankings. I'm guessing someone "self-ranked" to get Tempest Remastered, I think I remember someone trying to come up with "ok" rankings just to have something. Looking quickly at the list, it's just ordered by Rarity and then Alpha, so not very robust.
The rankings file is saved as you see it 1 through however many cards in that set. When we ingest the format into our system we take the rank in the set, and divide by the amount of cards in the set. So 1/233 = .004. The lower the better. "#239|Time Ebb|C|TPR" -> #<Rank>|<Card Name>|<Rarity>|<Set Code>
I actually fixed the issue with the Flip Planeswalkers recently, for some reason draft.bestiaire.org doesn't actually list them correctly in their rankings file, and according to the stats on their website, they have never been picked. If you want the most up-to-date rankings file you can grab it here: http://svn.slightlymagic.net/websvn/fil ... nkings.txt
But yea, if you want to create your own rankings feel free. I think it should be pretty apparent the format they are in based on the file. If you do create ones for VMA or TPR please post them so we can add it to the rankings file for all of the other users. I wouldn't worry too much about getting the spots "perfect" anything within 10 ranks of each other should be pretty negligible, I haven't looked at the code in a while, but the draft-code has a threshold for determining which is the card to pick, along with some other "Decision points"
Did that help?
Edit: Here's the line in the draft code
// roughly equivalent to 25 ranks in a core set, or 15 ranks in a small set
private static final double TAKE_BEST_THRESHOLD = 0.1;
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card AI (Improvements) Requests
by slyfox7777777 » 04 Feb 2016, 04:04
Thanks! This was very helpful. If I do come around to ranking VMA or TPR, I will definitely post it somewhere. I wouldn't be surprised if I made the time to do it sometime in the next week. Hopefully someone other than me can make use of it
- slyfox7777777
- Posts: 23
- Joined: 26 Mar 2014, 18:26
- Has thanked: 1 time
- Been thanked: 0 time
Re: Card AI (Improvements) Requests
by friarsol » 04 Feb 2016, 04:19
I'm sure they will be used. Two more things I just remembered:
1) Agetian and I were talking about "custom" rankings for cubes, which he implemented a few days ago. This allows for things like the Vintage Cube to have their own custom ranking file making cube drafting a little more interesting since the AI will have a better time of drafting. Not sure if you're interested in that, but the process of creating rankings will be pretty much the same.
2) A lot of the rankings are pulled in pretty quickly after the set is released, so they might not be the greatest representation of how things ended up falling for that format. Maybe if I have some time I'll write some tools to pull down updated rankings to reduce the amount of manual actions that happen. It still won't help with things like VMA, but it will help with cards that look mediocre, but end up playing really well in the format. Ideally, we'd have a file per set so it'd be easier to tinker with things. And maybe even simplify the syntax so the rank isn't required, it could just be one card per line and it'd be much easier to just move the cards around without needing to tweak numbers.
1) Agetian and I were talking about "custom" rankings for cubes, which he implemented a few days ago. This allows for things like the Vintage Cube to have their own custom ranking file making cube drafting a little more interesting since the AI will have a better time of drafting. Not sure if you're interested in that, but the process of creating rankings will be pretty much the same.
2) A lot of the rankings are pulled in pretty quickly after the set is released, so they might not be the greatest representation of how things ended up falling for that format. Maybe if I have some time I'll write some tools to pull down updated rankings to reduce the amount of manual actions that happen. It still won't help with things like VMA, but it will help with cards that look mediocre, but end up playing really well in the format. Ideally, we'd have a file per set so it'd be easier to tinker with things. And maybe even simplify the syntax so the rank isn't required, it could just be one card per line and it'd be much easier to just move the cards around without needing to tweak numbers.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card AI (Improvements) Requests
by slyfox7777777 » 04 Feb 2016, 22:28
Oh totally. These both seem like things which would make drafting in Forge much more fun! Anything that makes the AI draft more like a real person is something that I'm very interested in. Also yes, it's a massive pain to move rankings around currently, so I would welcome a change in that system for sure.
While I'm here, I thought I would throw out a question about TSP, BFZ, and OGW.
These are all sets which can have packs with cards from other set codes in them. Timeshifted for TSP and the expeditions in BFZ and OGW. In both cases, the extra cards have no ratings. What's the reason for that exactly? Is it just because there isn't currently any way in the code to have ratings across multiple sets, or is it just because nobody's done it yet?
While I'm here, I thought I would throw out a question about TSP, BFZ, and OGW.
These are all sets which can have packs with cards from other set codes in them. Timeshifted for TSP and the expeditions in BFZ and OGW. In both cases, the extra cards have no ratings. What's the reason for that exactly? Is it just because there isn't currently any way in the code to have ratings across multiple sets, or is it just because nobody's done it yet?
- slyfox7777777
- Posts: 23
- Joined: 26 Mar 2014, 18:26
- Has thanked: 1 time
- Been thanked: 0 time
Re: Card AI (Improvements) Requests
by slyfox7777777 » 05 Feb 2016, 00:41
Okay, I have a rankings file with the VMA rankings done. It will probably take me a little while longer with TPR, since for VMA I already had some resources lying around.
If anyone wants it, it's here:
https://drive.google.com/file/d/0B7wTUgmJC1I7eVRKY3R5U2dULUU/view?usp=sharing
Don't be surprised if you find a card ranked at 500 here and there. I might have misspelled something somewhere, and also I think there are 325 cards in the set and my final count came to 324, but just let me know and I will try to change it.
Edit: I found the missing card.
Here's an updated version:
https://drive.google.com/file/d/0B7wTUgmJC1I7Qnpva0RYZ2xJODg/view?usp=sharing
If anyone wants it, it's here:
https://drive.google.com/file/d/0B7wTUgmJC1I7eVRKY3R5U2dULUU/view?usp=sharing
Don't be surprised if you find a card ranked at 500 here and there. I might have misspelled something somewhere, and also I think there are 325 cards in the set and my final count came to 324, but just let me know and I will try to change it.
Edit: I found the missing card.
Here's an updated version:
https://drive.google.com/file/d/0B7wTUgmJC1I7Qnpva0RYZ2xJODg/view?usp=sharing
- slyfox7777777
- Posts: 23
- Joined: 26 Mar 2014, 18:26
- Has thanked: 1 time
- Been thanked: 0 time
Re: Card AI (Improvements) Requests
by friarsol » 05 Feb 2016, 04:08
Yea subsets are weird. I'm sure they don't have ratings because they don't appear in the rankings file. I don't really know how they'll work if they do have rankings. Maybe try adding the BFZ Expeditions as an expansion "EXP" as the setcode. Just out of curiosity, I'd mark each one as #1 (since you know everyone is going to first-pick an expedition if they get it) and see how they show up?slyfox7777777 wrote:While I'm here, I thought I would throw out a question about TSP, BFZ, and OGW.
These are all sets which can have packs with cards from other set codes in them. Timeshifted for TSP and the expeditions in BFZ and OGW. In both cases, the extra cards have no ratings. What's the reason for that exactly? Is it just because there isn't currently any way in the code to have ratings across multiple sets, or is it just because nobody's done it yet?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card AI (Improvements) Requests
by slyfox7777777 » 05 Feb 2016, 04:34
So, it looks like if I do that, it does read the rankings, so they don't have a ranking of 500, they have a ranking of 1, which is just how the algorithm works. I did find a solution, which is to add a whole bunch of dummy cards to the EXP set to inflate their relative rating, which works just fine, but it would be much more complicated in the case of the timeshifted cards, which actually need to have ratings relative to the other cards in the set. I could also do that relative to a bunch of dummy cards, but that's quite messy. I wonder if there's some way to make Timeshifted cards and Expeditions a part of their major set behind the scenes so that these ratings actually work without any extra nonsense?
Edit: Now that I think about it, dummies can actually be a pretty good placeholder for now. It looks like the code doesn't actually count the cards in the set to make the calculation for rating, it just divides by the highest number in the set, so I can just rate the cards from #1 to #10, repeating when necessary, and I should get a similar result to listing an entire set #1 to #300 or what have you, which is actually a ton of work.
Here's a version of rankings.txt which gives the expeditions a ranking of .01 (or at least I think it does. It's a little bit hard to test.):
https://drive.google.com/file/d/0B7wTUgmJC1I7MEc4Z3haZ3VCZjQ/view?usp=sharing
Edit: Now that I think about it, dummies can actually be a pretty good placeholder for now. It looks like the code doesn't actually count the cards in the set to make the calculation for rating, it just divides by the highest number in the set, so I can just rate the cards from #1 to #10, repeating when necessary, and I should get a similar result to listing an entire set #1 to #300 or what have you, which is actually a ton of work.
Here's a version of rankings.txt which gives the expeditions a ranking of .01 (or at least I think it does. It's a little bit hard to test.):
https://drive.google.com/file/d/0B7wTUgmJC1I7MEc4Z3haZ3VCZjQ/view?usp=sharing
- slyfox7777777
- Posts: 23
- Joined: 26 Mar 2014, 18:26
- Has thanked: 1 time
- Been thanked: 0 time
Re: Card AI (Improvements) Requests
by Hanmac » 08 Feb 2016, 14:33
AI does activate "Aggravated Assault" before attack, but it should do it after the first one.
Re: Card AI (Improvements) Requests
by muppet » 13 Feb 2016, 14:54
A.I. cannot understand it needs to discard a card to kill Reality Smasher.
Who is online
Users browsing this forum: No registered users and 179 guests