metastone icon indicating copy to clipboard operation
metastone copied to clipboard

[Request] API

Open IlyaHalsky opened this issue 8 years ago • 13 comments

Probably will do it myself since no one really needs it, but it would be nice to have some sort of API, for ML purposes and generating permutations.

IlyaHalsky avatar Feb 15 '17 20:02 IlyaHalsky

What do you mean? An API to get card information directly from metastone?

It'll probably be better to create an independent project for that purpose.

mayuso avatar Feb 16 '17 10:02 mayuso

Probably an API to create training data sets for ML. I was playing a bit with it in my forked repo. Got code to generate state history for 2 AI playing. But in no way it is nicely structured : )

lukaszgrad avatar Feb 16 '17 10:02 lukaszgrad

For my purposes I need to setup game board, and get some sort of tree with all the stuff that can happen, but it sounds very specific. More general request: Nice place where I can write stuff like GameBoard gb = new GameBoard (new Garrosh, new Anduin); gb.spawn(new DrBoom, RESOLVE_BATTLECRY, PLAYER_1); gb.spawn(new Wargolem, PLAYER_2); gb.trade(BoomBot1, WarGolem);

IlyaHalsky avatar Feb 16 '17 17:02 IlyaHalsky

What do you mean by nice place? All these things are already implemented in game engine. How would you run the game otherwise : )

lukaszgrad avatar Feb 16 '17 17:02 lukaszgrad

That stuff is mostly implemented inside the testing files, but my suggestion is to look at the Game State AI for help on this. This may allow you to get something more useful there. It is very similar to what you're looking for.

webadict avatar Feb 16 '17 17:02 webadict

Game tree is not implemented as is, but as @webadict said simple A* search strategy is implemented in GameStateValue AI. Note that usually game tree is created lazily, in the form of list of nodes at a given depth. Also nondeterministic effects cause the game tree to blow up in size, thus usually we perform some monte carlo tree search. Hope it helps

lukaszgrad avatar Feb 16 '17 18:02 lukaszgrad

Thanks a lot, do you guys have a place where I can ask stuff, like discord?

IlyaHalsky avatar Feb 16 '17 19:02 IlyaHalsky

I can set up a channel for Metastone on one I run. You'll have to ignore the fact that it's mostly a gaming Discord server, though.

webadict avatar Feb 16 '17 22:02 webadict

Yea, sure, if you don't mind random people coming and asking probably stupid questions:)

IlyaHalsky avatar Feb 17 '17 11:02 IlyaHalsky

Stupid? I know way too much about this project already, I'm just sharing knowledge at this point.

But alright, I'll post a link here eventually. Gotta get the right permissions and stuff

On Feb 17, 2017 5:57 AM, "Ilya Kachalskiy" [email protected] wrote:

Yea, sure, if you don't mind random people coming and asking probably stupid questions:)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/demilich1/metastone/issues/326#issuecomment-280631098, or mute the thread https://github.com/notifications/unsubscribe-auth/AFsY_n9zucd-7pHvuS4AUPPox3Vx-0QRks5rdYsUgaJpZM4MCNuu .

webadict avatar Feb 17 '17 12:02 webadict

One request that comes up quite often is the desire to have a command line operation mode. Basically people want to start MetaStone without the UI, just passing in command line parameters which specify the AI, number of games, decks and everything else. Then when the simulation is finished, they would like to get a report, either on the standard output or as a report.json which contains the statistics like win rate and everything else.

Maybe you were also referring to something like this when you talk about an API?

demilich1 avatar Feb 17 '17 15:02 demilich1

It would be great, but not for me, I was looking for ways use your work without UI for custom simulations. Seems like I'm just retarded, and everything is there, docs would be nice tho, but it's so boring to write them so I can't ask for them.

IlyaHalsky avatar Feb 17 '17 16:02 IlyaHalsky

Alright, I made a text and voice channel on my server, BadAtAiming Gaming: https://discord.gg/Bw7jzCc.

If you need help or you're bored, feel free to stop by. I'm usually nearby, but my friend has another server he uses.

webadict avatar Feb 22 '17 00:02 webadict