Current Player: red
Selected Piece: none
Phase: opening
This is a web application to play the game Linja, a two-player strategy game with scoring. Each player starts with 12 stones placed across 8 rows, with 6 on the home row and 1 in each other row. On each turn, a player first moves one stone forward by one row. Depending on how many stones are on that row after the move, a follow-up move may then be made by the same number of rows. If a stone reaches the opponent’s starting line with exactly the number of rows allowed, the player receives a bonus move and may advance or retreat one stone by one row. The game ends once both colours have passed each other or after 1000 half-moves, and points are scored based on how far the stones advanced.
This project was created by Danea Hassler as part of a bachelor thesis in computer science under the supervision of Oswin Aichholzer at Graz University of Technology. The User Interface with the style and the server was build upon a previous project by Danea Hassler.
The server is written in Python 3, using the Flask framework. The client is written in HTML and JavaScript, using jQuery. Compatibility was tested in Safari and Firefox on macOS. The same tests were conducted on iOS, and on Windows using Firefox and Microsoft Edge. On Linux, tests were carried out with Google Chrome and Firefox. The application is expected to work in most modern browsers.
The AI is powered by two comprehensive databases that enumerate every legal position and assign a score to each move.
One database reports the outcome as the number of half-moves to a forced win or loss or a draw under perfect play.
The other reports the outcome as the final point margin or a draw under perfect play.
Green numbers indicate a forced win in at most that many half-moves, or by that
many points.
Red numbers indicate a forced loss in the corresponding half-moves, or by that point
margin.
The letter D marks a draw with optimal play from both sides.
In win/loss mode, even values represent wins and odd values represent losses.
In points mode, positive values represent wins and negative values represent losses.
If the opponent deviates from optimal play, a faster win than indicated may still be possible.
At the beginning of the game, all stones are already placed in the starting position:
each player has 6 stones on their own starting row and 1 stone in each of the other rows.
On each turn, a player first makes an opening move, moving one of their stones
exactly one row forward (across a stick) towards the opponent.
Stones that can be moved for the opening move are highlighted in
orange,
and the valid destination row is highlighted in
yellow.
Depending on how many stones are in the row where the opening move lands, the player may then make a
follow-up move. In this case, another of their stones can be moved forward by the same number of rows.
All valid destinations for the follow-up are also marked in
yellow,
while the selected stone itself is highlighted in a
bright yellow.
If the player chooses not to make a follow-up move, they can click the Pass button.
If a stone reaches the opponent’s starting line with exactly the required number of rows,
the player receives a bonus move and may move one of their stones by one row forward or backward.
For more details look at the rules. Rules
Close
Linja is a strategic two-player game invented by Steffen Mühlhäuser. This digital version implements the official rules and offers AI opponents as well as analysis tools.
Example of the start position |
Example of scoring at the end of a game |
Current Player: red
Selected Piece: none
Phase: opening