Commit graph

381 commits

Author SHA1 Message Date
Oleg Agafonov
c30316512b * Target opponent or planeswalker abilities - fixed rollback error while AI plays that cards; 2020-01-15 07:03:26 +04:00
Oleg Agafonov
11976b5c89 Refactor: move player.damage params to default (same as permanent.damage); 2020-01-14 09:15:33 +04:00
Oleg Agafonov
1f99249d10 * AI: fixed rollback error while computer try to play some cards with targets from exile; 2020-01-14 05:00:56 +04:00
Oleg Agafonov
e1fea330dd Test framework - multiple improves:
* Added support of spell ability choice in free cast (chooseSpellAbilityForCast);
* Added support of "up to" targets setup in addTargetAmount (use TestPlayer.TARGET_SKIP to stop target choose);
* Restored multiple checks for addTargetAmount;
* Fixed many wrong tests (wrong order or missing commands);
2020-01-12 01:17:39 +04:00
Oleg Agafonov
b366a83a45 Prepare new release 2020-01-09 08:55:26 +04:00
Oleg Agafonov
bb59cedbd9 AI fixes:
* Gain control abilities - fixed wrong target chooses by AI (selects weakest permanent instead most powerful);
* Target of an opponent’s choice abilities - fixed that AI was able to cancel card cast, fixed wrong target chooses (Evangelize, Echo Chamber, Arena, Preacher, etc);
2020-01-04 22:37:16 +04:00
Adonis Pujols
56eef2b563
Fixed Computer Player treating unprevented moves as unplayable.
(First time contributing so please excuse my noobness) Card not prevented by an effect should be playable ("&& !prevented"), but currently AI says card not prevented is NOT playable ("&& prevented"). Also, not sure why AI doesn't add to unplayable even though its not contained by playableInstants or playableNonInstants. I'm not even sure if we're maintaining ComputerPlayer's decision logic (as opposed to Computer Player7).
2020-01-01 14:44:45 -05:00
Oleg Agafonov
fac7ea1388 * AI: fixed rollback errors with copy spell abilities;
Tests: added copy spell support for test player;
2019-12-23 21:47:01 +04:00
Oleg Agafonov
d26fde8dbc Prepare new release 2019-12-21 18:23:15 +04:00
Oleg Agafonov
bd71c98e3e Fixed AI freeze with non available targets 2019-12-21 18:10:29 +04:00
Oleg Agafonov
8cce5a3648 * AI: reworked computer choices for "target permanent" targets:
* Fixed that computer was able to target own permanents for bad effects and opponent permanents for good effect;
 * Improved target choices on card score (as example: boost most valuable, discard most weaker);
 * Tests: fixed false positive tests (AI depended);
 * Tests: fixed that test player can't find permanents for some filters/predicates;
2019-12-20 20:20:16 +04:00
Oleg Agafonov
419cbf3c28 * AI: fixed that computer was able to choose non valid targets/cards (from all graveyards, hands, etc); 2019-12-16 02:58:10 +04:00
ssouders412
2d3247d732
Updated pronouns to reflect current rules and oracle text
Replaced all instances of "her or she", "him or her", and "his or her", with "they", "them", and "their", or sometimes "that player". Updated verbs where appropriate.
2019-12-06 14:29:36 -05:00
Oleg Agafonov
7469d59eee Prepare new release 2019-11-30 01:32:54 +04:00
Oleg Agafonov
f719503a89 Prepare new release 2019-09-27 21:19:03 +04:00
Oleg Agafonov
8dc6e152af Prepare next release 2019-09-10 00:33:47 +04:00
Ingmar Goudt
eb0cfc94f8 change some size() comparisons, to isEmpty() 2019-07-14 20:53:23 +02:00
Oleg Agafonov
716b929877 Prepare new release 2019-06-30 18:33:29 +04:00
Oleg Agafonov
34ff038053 AI: improved target amount abilities:
* added support to search targets from multiple opponents instead one;
 * added support of TargetCreaturePermanentAmount and all new target types;
 * added new priorities (kills most valuable first);
 * added bad and good conditions (choose most valuable in good case and most weakest in bad case, e.g. damage yourself);
 * fixed that AI targets opponent for good ability instead yourself;
2019-06-26 21:46:11 +04:00
Oleg Agafonov
073b003b37 * AI: planeswalkers gets more priority in targets selection; 2019-06-26 21:45:15 +04:00
Oleg Agafonov
55bc61000a Prepare new release 2019-06-06 23:03:38 +04:00
Oleg Agafonov
b64a75aa4b Typo fix 2019-06-06 16:55:17 +04:00
Oleg Agafonov
12fc854777 [MH1] added Unbound Flourishing 2019-06-06 16:52:06 +04:00
Oleg Agafonov
67f02ec5ab * AI: fixed error on cards with target player or planeswalker; 2019-04-30 12:53:41 +04:00
Oleg Agafonov
bbf1c1343a Prepare release 1.4.35 2019-04-23 23:32:54 +04:00
Oleg Agafonov
f273fdd071 * AI: fixed errors in cards with "copy the spell for each"; 2019-04-18 12:54:28 +04:00
Oleg Agafonov
238aa7abdc * AI: fixed game freezes for cards with different human/computer logic (#5023); 2019-04-04 09:00:30 +04:00
Oleg Agafonov
de4befb9c2 * Sideboarding: fixed that it possible to auto-submit 40 cards deck instead 60 in constructed formats (#5579);
Sideboarding: fixed that cheated deck with sideboard can be used instead lose the game;
2019-04-01 07:34:46 +04:00
Oleg Agafonov
65bb9b2161 Prepare new release 1.4.34 2019-03-29 18:31:00 +04:00
Oleg Agafonov
4504ad5e6f * Fixed infinite AI choose if there are not enough different targets, e.g. Biomantic Mastery (#5023); 2019-02-22 03:29:01 +04:00
Oleg Agafonov
b7a7a95180 Fixed infinite chooseTarget on invalid targets while AI plays (#5023); 2019-02-21 05:31:30 +04:00
Oleg Agafonov
7eba755666 Refactor card ratings, fixed rare error exception "comparison method violates its general contract" (different ratings in same card); 2019-02-01 17:41:29 +04:00
brodee
ea9e2d55fc adding rna AI card ratings
adding rna AI card ratings
2019-01-16 22:47:51 -08:00
Oleg Agafonov
14f66029f8 Missing v33 commit 2019-01-16 20:59:45 +04:00
Oleg Agafonov
d06b79e9b4 Fixed infinite AI loop in TargetPermanent abilities (see #5023) 2019-01-14 15:38:27 +04:00
Oleg Agafonov
2ebad63595 Added seeds support to random util:
* all xmage code uses shared util to generate random values;
 * tests can uses seeds to repeat "random" results like deck builds or AI plays;
2018-12-30 03:52:30 +04:00
brodee
4c94938c14 Merge branch 'master' of https://github.com/brodee/mage 2018-11-28 23:01:47 -08:00
brodee
6a37e102c0 uma ai limited ratings 2018-11-28 23:01:12 -08:00
LevelX2
e6ce58d6bf XMage 1.4.32V0 2018-11-26 19:30:22 +01:00
Jeff
1bac7fc04c - Fixed Soul Strings. DoUnlessAnyPlayerPays now supports X costs. 2018-11-20 09:46:36 -06:00
brodee
83afff5a05 kld card ratings
draftaholics data was very skewed towards masterpieces. which meant
decent cards were ranking very low relatively
I used the relative ranking from draftaholics and generated a normal
distribution mean60 std 20 for these rankings to smooth it out.
2018-10-28 16:18:53 -07:00
brodee
43f32f9640 card ratings files fixes/updates
fixed kld and aer
2018-10-28 15:24:06 -07:00
brodee
08d895d110 fix typos in card ratings files 2018-10-28 15:20:51 -07:00
brodee
a95f3b2211 remove ktk from list of sets with ratings
haven't commited the ktk rating numbers, need to remove it from the list
2018-10-28 14:27:06 -07:00
brodee
6f93abfd5a ai ratings revamp code review changes
* when resources are missing, fails gracefully
* uses highest found rating, rather than most recently found for the
case of sets containing duplicates
* moved ratings files to their own directory
* thread safe reading of all files
2018-10-28 14:23:53 -07:00
brodee
505a4b00a7 AI Draftbot rating system reworked, ratings added for 10 sets
the way stored ratings for cards has been reworked
1. each set has its own ratings file and it will be loaded dynamically
if the AI needs it
2. each ratings file for a set is normalized within itself, so the
rating systems don't need to be scaled to match eachother. essentially
cards are rated within the context of their set
3. changed the rarity rating booster to only apply to unrated cards
4. the file setsWithRatings.csv explains how to add additional ratings.
no code changes are required, but a recompilation will be required to
add the files to the jar.
2018-10-28 12:10:00 -07:00
brodee
4f61afa62b AI updates, more cards will have the isRemoval bonus to their card rating
these weren't being picked up as removal spells and now are:
* modal spells where one mode is a removal spell
* spells that do a dynamic amount of damage, such as fireball
* cards that reduce the toughness temporarily or permanently
* cards that keep a creature tapped down
* cards that exile a creature
* cards that damage creatures that are attacking or blocking
* enchantments that exile a creature when they etb
* fight cards, and one sided fight cards

the ai will now rate those types of cards higher as they are removal
2018-10-28 00:16:14 -07:00
brodee
04457558b3 ai tweaks: improve rating for multicolor cards and reduce effect of rarity
multicolor cards are the payoffs for playing those colors so they should
be better
reduced the effect of rarity increasing the rating
2018-10-27 11:50:59 -07:00
brodee
843702bd86 draftbots and afk autopicks will more aggressivly take rares
two draft quality of life improvements for situations when real players
quit or go afk.
1. made the draftbot lean on rarity for card ratings. this helps make
the draftbots behave and not just pass bombs to the human players.
2. changed the draft autopick that happens when the timer runs out and
the player hasn't selected anything. I changed it to pick the last card
in the pack, which should be the rarest, so basically it raredrafts.
again making it so AFK players aren't just feeding real live human
players the best cards.
2018-10-26 22:17:57 -07:00
LevelX2
deb675a74a Xmage 1.4.30V0 2018-08-15 11:35:40 +02:00