Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Board game where tigers hunt goats while goats block their movements (github.com/sumn2u)
90 points by iamsuman on April 7, 2023 | hide | past | favorite | 24 comments


Bagchaal. Memories of playing this in the Kathmandu alleyways and random front yards of people. The 90s was alright.


That short post was so evocative I would love to read your blog or buy your book.


I saw this, there were just playing it with stones on the ground.

https://en.wikipedia.org/wiki/Bagh-Chal


Feeling nostalgic, right? Having grown up playing this game, I find it hard to see so few people playing it these days.


I've seen a game "Wolf and Goats" played on standard checkerboard.

Goats are white and set up like standard checkers. Black is one wolf set up on any black field on the opposite edge.

Wolf moves diagonally back and forth and takes pieces by jumping over them (at will?) like in checkers (also back and forth) and wins when he passes the goats so he has clear way to their starting edge. Goats can just move forward like in checkers but they can't take wolf piece and win if they surround wolf so that he doesn't have any move left.

There are also few similar games played of different boards: https://en.m.wikipedia.org/wiki/Fox_games


Looks interesting. Love to try those games.


I tried playing as goats on the demo hard ai. It was a bit more interesting than I expected, but after winning on hard one time I was able to immediately win again in about 15 seconds. Is this game easily solved for goats? Or is the ai perhaps just not very good? It does seem like it just chases opportunities for captures greedily.

edit: Looks like I struggle to win as tigers too


The game seems to be glitchy about its ruleset. I lost as tigers when only six goats were placed.

Edit: https://github.com/sumn2u/baghchal/blob/master/src/library/u...

This is the code for legal movement and now I understand why it feels buggy: it's trying to express the logic by converting between a mishmash of numeric node indexes, directions and distances. This exposes several classes of bugs that aren't about the logic, but how the state is encoded.

Two approaches that would work better are:

1. Design a node data structure with 8 directional exits. Connect the graph through that structure; express movement as a traversal through nodes along the same movement direction once or twice, rejected if it reaches a null connection or node is occupied. Express board state by serializing the node graph down to an array of "goat, tiger, empty" and comparing the array to find repeated positions.

2. Generate the graph offline and use it to emit lookup tables for all board indexes and their possible movements. This would work as an optimization if you needed it to run very fast(e.g. real time game with thousands of goats and tigers), and it would dramatically reduce the amount of re-encoding of state going on in the inner loop.


I think the movement works correctly if you accept that tigers can't go back to their previous spot, which is rough. However, the bug seems to be that sometimes, when a tiger TRIES to do the above, it will trigger a loss for the tigers even if there are legal moves. I have managed to get a win against Hard Goat AI. Generally you want to be positioning tigers with 2 spaces between them, and when you need to break the pattern, do so with a tiger that can get back to its original space in a right triangle pattern with the original spot being the right angle vertex.

I think this is mostly just possible because the AI plays imperfectly. Again, if you forget which tiger was last positioned where, you'll probably trigger a loss for yourself.


But the AI tigers are able to go back to their own spots.


Thank you for the suggestions.


With this AI, It's trivial to win as goats by playing as far in the corners as possible on every turn.


The Goat AI appears to do the same, and seems very hard to defeat. What's the counterplay?

edit: I'm not sure the game is coded correctly. It seems like once a tiger moves from A to B, it can never move from B to A. Including cases where the tiger jumps A to C, it cannot jump back from C to A if the goat places another one in B... That feels very unintuitive and untrackable in a real world game.


There are times where the game could fall into a repetitive cycle of positions; especially goats may use this resort to defend themselves from being captured. In order to avoid this kind of situation, that rule was established.


Well it's not my game, but this does not sound correct to me. The game by definition cannot get into a cycle of positions until all the goats are placed. This seems like it ought to be a restriction only on moving goats, and only that the goat player should not be allowed to move the last moved goat to it's original spot.

As it stands now, a tiger player cannot move a tiger to it's previous spot from several turns prior, including capturing over the same space. Which means that even if the goat player loses a goat, they can put a goat back in the same space and it'll now be safe (vs. the tiger that just captured it at least). I'm not convinced it is possible to win against a competent goat player.


Your arguments are also valid. I believe there should be an option to choose whether this restriction is applied or not, which would provide players with greater flexibility.


Ludii has a nice page on Baghchal: https://ludii.games/details.php?keyword=Baghchal


Indeed. What do you think of this one?

https://iamsuman.itch.io/bagchal


See also Adugo, Taptana, Komikan


Also Nine Men's Morris -- which Wikipedia informs me has been solved (it's a tie).


It also reminds me of games like Fox and Goose and Tafl. I wonder if they are all related.


There's also Pratchet's Thud which is similar to Hnefatafl but has no king piece: https://boardgamegeek.com/boardgame/4532/thud

(Asymmetrical game fans should also look at Ogre https://boardgamegeek.com/boardgame/5206/ogre - one advantage of asymmetrical games is it is very easy to handicap by adding or removing pieces from the side that is "weaker/more numerous")


My preferred descendant of Fox and Geese is Asalto[1]. If you have e.g. a bunch of pennies and two dimes, plus a ruler and a pencil you can draw your own board in under a minutes. It also plays on many solitaire[2] boards.

With practice, the attacker will always win, so you play two rounds, switching roles and see who can win with the fewest losses.

1: https://boardgamegeek.com/boardgame/25988/asalto

2: https://boardgamegeek.com/boardgame/13713/solitaire


Wow, these games are so cool. Thanks for sharing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: