I'm collaborating with a friend to, as a challenge, create a bot that can beat the best human players at a browser-based card / board game called Duelyst. It looks like this:

enter image description here

It was my original plan to build very basic machine learning from the ground up but he suggested we look into options in this list of JavaScript based machine learning libraries.

The thing is, neither of us know enough about machine learning to know what kind (it's clear there are many different categories / types) we should look into.

Of the items in the list of General Purpose JS Machine Learning libraries there are:

  • Deep Learning

  • Clustering

  • Agglomerative hierarchical clustering

  • Decision Tree using ID3 Algorithm

  • Digital Neural Networks Architecture

  • K-means, fuzzy c-means

  • FANN (Fast Artificial Neural Network Library)

  • LDA topic modeling

  • Logistic regression/c4.5 decision tree

  • Support Vector Machine

  • Simple and multiple linear regression

  • Kalman filter

  • Markov Decision Processes

Now obviously my first order of business was to start browsing these different projects and look up a lot of the terminology on Wikipedia but I quickly realized this was such a broad and diverse subject, I would do better to ask an expert to point in the right general direction. The decision making in the game basically involves using one of the few cards you currently have access to (and predicting what cards you have left in your deck which you may gain access to in the near future) and playing them at the right time, moving the minions summoned by the cards around on the field to protect your general and defeat the enemy general.

We already have a fairly good AI developed for playing the game, and I now want to utilize machine learning to predict the opponent's moves and improve the bot's decision making in order to get better at the game with experience.

Which category / categories of machine learning are relevant to the task of improving the decisions of an AI playing a turn based, card / board game such as the one described?

  • How much past game info is already available? If you have a large corpus of played games, you can train certain types of algorithms on it. If you have access to reasonably good computer opponents, and can play with them at high speed, it again opens certain classes of learning algorithms. If the only learning material are the few games currently being played, the choices are very different.
    – 9000
    Feb 9, 2017 at 18:09

2 Answers 2


Simply put, reinforcement learning studies just that:

Reinforcement learning is an area of machine learning inspired by behaviorist psychology, concerned with how software agents ought to take actions in an environment so as to maximize some notion of cumulative reward.

RL examples frequently involve games; often these models formalize a player's opponent as part of the environment. (Others study all actors, and involve game theory.) Often, the "reward" is related to winning or losing.

It's a very broad, deep field touching concepts in many other areas. E.g. recent advances include applications of deep learning.


machine learning is a broad and difficult subject. if you want to use machine learning in a concious way, i would suggest reading about:

and since you can't always use game tree in a pure way (not enough resources in the universe), also about heuristics (https://en.wikipedia.org/wiki/Heuristic_%28computer_science%29).

and regardles of links, wikipedia is a place to start, not to learn. so some book (i learnt about it from "land of lisp - learn to program in lisp, one game at a time") is a must.

  • Minimax & its derivative, alpha-beta pruning, aren't machine learning techniques.
    – RubberDuck
    Apr 10, 2017 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.