# Kaxo

This game, called Kaxo, was invented by Alex Voak, a student at the King's School in Ely.

Kaxo is a real challenge! Two players who take turns crossing out dots using vertical, horizontal, and diagonal (45 degree) lines. They can also choose to cross out a single dot. Lines must not pass through each other, or any dots that have previously been crossed out. The player who crosses out the last dot loses. (You can see Alex explaining the rules in the video below.)

Have a go at playing the game, either against the computer, or against a friend (choose 1 player or 2 players).

Tablet/Full Screen Version

If you can't find a winning strategy, why not try reducing the grid size or work backwards from a completed game?

In the video below Alex explains the rules of the game and discusses how to play it.

### Hi, very interesting and fun

Hi, very interesting and fun game here! Is there a way of playing the computer so it plays optimally so I can see if I can find a strategy?
It is a tad frustrating playing against an AI that seems to play to lose.

### Improving the AI

Hi Ashley,
It's certainly possible to make the AI better in the end-game and we have the beginnings of the code necessary to do this at https://github.com/gmp26/kaxo/tree/master/src/kaxo
- see files ai.cljs and hum.cljs for the details. Unfortunately I don't know when I'm going to get the time to develop these ideas further. The general problem of developing a complete winning strategy for kaxo is still open. It's an open source project so if you felt like contributing I could point you in a plausible direction. The trick is to use symmetries to reduce the search space.

Otherwise the best advice would be to use the 2-player version and practise with another human.

Mike

### there is a strategy to win

you can win by using lines the computer don't know how to use lines so just use both lines and dots.

### Kaxo

Kaxo is hard to draw the lines across because it scrolls to the bottom of the page. So FIX it.

Alternatively Arian, you could click on the Full Screen or Tablet link.

If there are parts of the software you would like to change then I am very happy to review tested updates submitted to me in the form of pull requests. Full details on how to do this are at https://help.github.com/articles/using-pull-requests/. The source code is linked from the animation.

### I know how you can always win

Just make sure that when you move you leave an even amount of dots.Trust me it always works

### Hi Lilly! Interesting thought

Hi Lilly! Interesting thought. Can you explain it further?

### Computer player

The computer player isn't very challenging compared to a real person this is a flaw but improving the computer would make it a much more common game for me

### Easy

The winning strategy is to cross out the longest diagonal first, then cross out the horizontals and verticals on the edge.

### Maybe, maybe not

You need to play against a human with this game as the computer does not play well. If you are playing a human I think you need to take account of your opponent's moves somehow, but crossing out the diagonal could give you control of the game if you know how to respond to subsequent moves.

### Kaxo strategy

You need to go down the screen making the longest possible horizontal lines and leave the computer with the last gap.

### easy way to win

It is easy to win the computer always uses dots so use a line to cross every thing out except one then you win