4 ms·
Magic is an interesting game just from an text analytics perspective. Using a source like mtgjson you get a reasonably sized corpus of text that looks natural e
by Everlag 11y ago
Magic is an interesting game just from an text analytics perspective. Using a source like mtgjson you get a reasonably sized corpus of text that looks natural enough for a human to comfortably grok but sufficiently templated to apply even naive methods and acquire awesome results.
I built a tool that uses n-grams to find cards similar to each other. The result is comparable to manual suggestions done by users but takes around a minute rather than months to cleanly update after a new set is released!
- sr-ix 11y agoIs this tool open source anywhere?
- Everlag 11y agoCheck out my reply to centizen
- centizen 11y agoI am extremely interested to see anything you have public on this project - both from a technical and deckbuilder's perspective!
- Everlag 11y agoYou can see a working example over at https://preorda.in/card/Kiora,%20the%20Crashing%20Wave/Born%20of%20the%20Gods https://preorda.in/card/Kiora,%20the%20Crashing%20Wave/Born%... I wrote it around a year ago when I was still getting a good feel for go so its a fairly gross ~500 line go package. However, it exports a moderately sane QueryableSimilarityData with the ability to Query that data for individual names. A query result is both the cards that were found to match and how confident it was. It caches after computing the entire dataset's results so it is fast to query after closed. If you want to muck around with it, you'll need to use a relative import because its just easier for a single file package. Everything you need apart from the dataset is in https://github.com/Everlag/goPricesBeta/blob/master/utilities/cardData/similarityDB/similarityBuilder.go https://github.com/Everlag/goPricesBeta/blob/master/utilitie... Just stick an AllCards-x.json from mtgjson.com in the same directory as binary the package was used in and it should expose the interface I described above to anything trying to use it. As a note, its non-permissively licensed but message me on reddit under this username and I'll re-license that component. Also, feel free to message me if you want a hand or have any ideas.
- _raoulcousins 11y agoAre you the creator of mythicspoiler? I know they wanted to do something like that. As of a few sets ago the 'Similar Cards' in their spoilers were chosen manually.
- Everlag 11y agoI am not but curiously enough I got the idea from a short response the creator of mythicspoiler had made on a reddit thread asking for an api to find similar cards or some such. He mentioned that he had played with n-grams but found it to be a dead end. I ran with the idea and found a version weighted on matched n-gram length gets reasonable results.