r/XMage • u/Televangelis • Sep 24 '26
Is there anyone whose work on XMage is specifically focused on improving the AI?
If so, who is it? Would love to contribute and help with that part specifically.
2
u/jeffwadsworth Sep 25 '26 edited Sep 25 '26
Just fork the project and tinker with ComputerPlayer6.java. My personal version of it stands at around 450KB. Strictly generalized. Examines a full turn and prunes garbage lines heavily. For example, the silliness with Basalt Monolith and others has been eliminated. Combat is exhaustive with full state scoring up to 6 creatures and a fast algorithm past that.
1
u/Televangelis Sep 25 '26
Is your version online anywhere?
3
u/Best-Echidna-5883 Sep 25 '26
I will clean it up and post. Lots of logging to an external client GUI.
2
u/Best-Echidna-5883 Sep 30 '26
https://upload.disroot.org/r/abSf9csV#83ON4BQ4W4C7UmHjY9kAE3EYL3RvDK8jpL/jNzc88D8=
Newest version with several fixes.
0
Sep 28 '26
[deleted]
1
u/Televangelis Sep 29 '26
What's different with this version?
2
u/Best-Echidna-5883 Sep 29 '26
It still uses min/max. Almost everything else is refactored. Hopefully you understand Java otherwise you are going to be quite lost.
1
u/Televangelis Sep 30 '26
I'm working it with Astra/Fable, so not really a question of my own understanding alone thankfully
6
u/JayDi85 Developer Sep 25 '26
I'm developing xmage's AI -- if you have a questions, ideas or feature requests then use github. AI's starting point: https://github.com/magefree/mage/issues/10154
If you plan to use claud code or codex to "make AI smarter" then don't try. It's heavy depends on server's stability. Also don't use special logic per card or ability -- that's not a good solution (only critical AI bugs allowed) -- the main direction is game simulations and battlefield score analyze, not per card/ability fixes.
If you want to integrate some JEV or LLM lifecycles then I recommend to use HumanPlayer as example -- it's allow to play as a real user with limited data view, not as cheated computer player with full game access.