Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Play a pen-and-paper game that is almost unknown in the US and Europe (paper-tactics.com)
303 points by Kharacternyk 9 months ago | hide | past | favorite | 83 comments



Hi HN, I played this game a lot in school over here in Ukraine and was surprised that there is almost no coverage [1] of it in English. So, I built this tiny website where one can read the rules and play the game online. There is also an optional game mode that is impossible IRL on paper (with the "fog of war").

The game is usually known as "virus wars", but I didn't feel like registering a domain name with the word "virus" in it, so Paper Tactics it is:)

[1] https://www.iggamecenter.com/en/rules/viruswars is the only English source I know, there is also a Wikipedia article in German: https://de.wikipedia.org/wiki/Kampf_der_Viren


I would suggest listing players "looking for partners" somewhere so I can join their game instead of being specifically limited to finding someone with the exact same variants as me. I may be fine with, say, any number of neutral units, so I could be matched with anyone looking for 15%, 25% or 35% instead of having to guess which number will yield a match quicker


I second this :) Alternative could be to list open games.

Anyway was fun to learn thx OP :).


I guessed the game just by “show HN” title :)

We played this game a lot in the Urals during high school, but upon arriving in Moscow for higher education discovered that locals don’t know about it. Good memories. I implemented a version of it in MIDletPascal in my 10th grade.

Another popular modification was “rivers” which would drown any unit placed in the next turn, and also support for 3rd and 4th player, you just have to have enough pens of different colors :)


This is a traditional game called "Voyna Virusov" or "Virus War". There is a version of it on Pencil and Paper Games with clearer rules, and some background history:

http://www.papg.com/show?5SB0


Thanks - I was struggling to understand the game explanation on the original site.


Glad it wasn't just me. I found them challenging to grok due to their complexity and lack of clarity in key aspects such as movement, grid layout, and strategic objectives.

*The fact that the pencil symbol controls the number of moves per turns, which was 3 by default, confused my learning process for a good 10 minutes as I had no idea what was going on.


I had to play a few games to understand the rules, but I'm wining most games. How good is the bot?

It's strange that you can make a few moves in each turn. With 1 move the strategy is too easy. Which is the standard lenght of the turns?


The bot is not very good, unfortunately. It's mainly useful to help understand the rules, as in your case. If you're interested in playing with an experienced player, ping me at nazar@vinnich.uk :)

> Which is the standard lenght of the turns?

The usual setup is a 10×10 grid with 3 moves per turn. More moves means more interesting manoevres are possible. I like 7 moves on 12×12.


So the source code of the bot is here: https://github.com/Kharacternyk/paper-tactics/blob/master/pa...

It seems like there's an evaluation function but there's no state search / recursive minimax tree for the bot.

I think if we added a 10-ply lookahead minimax algo for the bot here it would be pretty good. [1]

I will probably do it myself if I end up having a bit of free time this weekend.

[1] https://en.wikipedia.org/wiki/Minimax#Minimax_algorithm_with...


Monte Carlo tree search is another “easy” way to build a decent AI for a game. I love it because you simply define the rules of the game in a purely functional way, and it does the rest.

https://en.m.wikipedia.org/wiki/Monte_Carlo_tree_search


I was wondering about the architecture because I want to be able to make little games like this, so I'm super happy to see the source here, thanks for posting it! And looks like you put a lot of thought into the architecture too, going to study it.


Good old Alpha Beta pruning. I have a real mental block whenever I try to code that algorithm!


I'd say the bot is very weak. My first game I had no real idea what I was doing. Half the game I thought I had to maintain contact with my starting square or lose, until I managed to wall in my opponents starting square and didn't win. Then I tried to make as many walls as I could because I didnt like my pieces being captured and walls seemed more solid. Suddenly it said I won and I was like wait how, turns out I had managed to turn every circle into a wall except the walled in starting square.


Yes, very weak is probably a better description. I haven't learnt the theory behind AI opponents properly yet, so this bot is essentially a weighted random choice.


My guess is that for 1, 2 or 3 moves per turn it's possible to make a bot that looks ahead 2 or 3 rounds using brute force and then use AB pruning to pick the best move.

With 7 moves per turn the search space is too big and it looks difficult.

I tried a few games with neutral pieces, and it' move difficult to beat the bot.


Now I feel negative. The rest of the implementation was very nice. Pretty ui and everything worked well.


Seems like a great opportunity to train a neural network model for bot. There is a good article on tic tac toe for a base https://nestedsoftware.com/2019/12/27/tic-tac-toe-with-a-neu...


> It's mainly useful to help understand the rules, as in your case.

I agree.

[spoiler alert]

I tried with 2 or 3 moves per turn. My strategy was to advace in diagonal to have a lot of space in tha back, and keep some distance from the oponent. When it advances, I wall the pieces. If it doesn't advance I fill my backshard space. With 2 or 3 it's humanly learnable in 10 minutes. I imagine that 7 moves would be much ore complex, but sadly I have no time now.

Perhaps you can progem the bot to advance more in the first few turns. (Assuming my strategy is good.)


Your strategy is definitely good — capturing territory to fill it later when advancing doesn't make sense is important. 7 moves are more complex, but much less so when playing against the bot.

Your suggestion about making the bot eager to advance makes sense, thanks. Hope you'll play a few times against a human opponent in the future:)


Two small sugerstions:

* Make a small pause as if the bot is thinking each move. Probably .1 or .2 seconds is enough and not boring. We made a few games a long time ago, and a small pause makes it easier to understand the rules.

* When the game finished, I still can see my token as if I can draw it. It's very confusing until I notice the congratulations message. Don't show the token whe the game ended.


The bot plays perfect paper-tactics. You are a savant.


Unfortunately the bot is not very good. Just by reading the rules I was able to beat it every time on multiple rulesets.

The matchmaking is also difficult to find a partner since the rules are so customizable, and there's no way to tell what rules potential partners could be searching with. Maybe a list of games that are looking for an opponent would be good.


I just read the first paragraph and then decided I wanted to play and I still beat the bot first try. At least that means the game rules are fairly discoverable :)


I didn't understand the rules until most of the way through the game and I still won against the bot. I'm not clear if its really doing anything better than playing randomly based on that.


It's a weighted random choice, so a bit better than randomly because of the weights, but not much better.


Yeah, the bot is good for learning, but after a few games it becomes easy to just go after it directly, kill the Os which connect the walls and win easily.


Nice job!

Nikoli (the company that is credited to the rise of Sudoku!) has a lot of pen and paper games. Check it out.

https://www.nikoli.co.jp/en/


The rules of the game are itself like a virus. Looks like everyone here played a slightly different variant. It mutated wildly across space and time.

After I learned two different rule sets from two different sources, I went on and invented my own version. It became an instant hit in our class for many years to come.

Basically:

1. the map is randomized, with some "islands" randomly drawn, separating the map into "land" and "water"; map size is the whole A5 sheet, which is around 30x40 I think

2. player has 10 moves per turn, moving on "water" cells counts as 2 moves

3. the objective is not to kill everything, but only the enemy starting unit ("the mothership")

4. we even added FFA multiplayer later, where each eliminated opponent nets you +2 moves per turn for the rest of the game, to promote aggression. The diplomacy was intense at times, with "vassal states" and coalitions formed against stronger players.

Oh the memories.


We did play on an A5 as well! We called the variant "the Lord of the Rings", it was two players that played humans and elves versus one who played orcs. Only humans were allowed to move diagonally, elves could place walls over an empty space, and the orc player had more moves per turn and two bases.


It would be nice to have an option to play against someone locally (sharing the same computer)


There's a pitfall with the settings: because there are so many settings, and you can only connect with people using the same settings, and there's no lobby or way to know which settings other people have set, if you change any setting you're likely locking yourself out of the matchmaking pool, until you erase your cookies or remember the initial config.

Otherwise, fun game, good implementation!


This is super fun. But: I am winning most of my games as green / if I am going first. I struggle otherwise, not having the initiative


Being second is beneficial at the end of the game — the first player will run out of the legal moves quicker, all other things being equal. I'm not sure it completely balances out the first player advantage, though.


Well this is very addictive, thank you for sharing.

If you're looking for feature requests then the ability to view move history (especially after the game is over) and the ability to share completed games would be nice. I see a game ID but it's not clear to me I can do anything with it.


Good suggestions, thanks! The only purpose of the ID for now is to allow people to verify that they are matched by checking that the IDs are equal on both sides.


This is the BGG entry for the game, or at least a very similar game:

https://boardgamegeek.com/boardgame/68214/virus-wars


I like that it has the concept of supply lines: a wall works (it can expand) only if supplied by a cross. I attempt to cut the opponent supply lines by looking for and suppressing every cross in contact with its walls but I have to protect my crosses.


I think this is very similar to one of the games that I played growing up. I'm from a remote corner of India and everyone there knows how to play (school, family gatherings, etc). I tried teaching my kids but they find it too boring and mundane.


I don't understand the capturing mechanic? Playing against the bot always leads to sudden capture of dozens of units at once.

How and why does this happen? Are you able to surround units or get bonus turns for walling a unit?

The Learn page is a little unclear on this.


You can capture instead of placing a unit as a move. The bot may give an impression of capturing a few units at once because the whole turn (3 moves by default) of the bot is computed and rendered at once.


It took me a few goes to work it out. The key - which is mentioned in the docs but IMO not clearly enough - is that one of your active units must be adjacent to a run of walls in order to make those walls active.


Source for calling it "almost unknown"?

I'm from Europe and this game is totally known. I had a university project to program one in C. The bot especially was fun to implement.


Also "unknown in Europe" then explains the game is played in Ukraine... I understand some level of clickbait is needed to catch attention but that straight up lying here. I expected a game from Asia, Africa or South America.


I'm sorry, it's not intentional. When Ukrainians refer to Europe, they almost always mean the EU. We need some mental shift to consistently include ourselves when talking about Europe.


Altough I am from the Netherlands and people here do this too (everything east of Germany is not Europe...), it always bothered me we call Eastern Europe eastern! The eastern third of Europe is Russia! Ukraine and the rest of 'eastern' Europe are really central Europe. AFAIK the Poles do this correctly consistently.


> Source for calling it "almost unknown"?

I see what you did there!


When I was in school, for some reason I had an enormous amount of free time in class where I’d be sitting there quietly with just a pencil and paper to kill time. I’d invent strategy games to play against myself, or draw out a go board (it was a pain to erase captured stones!). Better than the alternative of seeing how long I could hold my breath. I wish I had known about this game, it’s perfect for pencil and paper!



That was my introduction to vectors in my sixth year of school.


That one was quite fun, thanks


Feature Request: A lot of people disconnect after some time, there should be some kind of countdown for auto-victory.


It should detect the browser window/tab being closed and automatically concede. You are right that there is no timeout, though.


I’ve been playing it for several days now without fully understanding all the rules. I like it but I win every game easily. I just neutralize the opponent’s marks and then lock them in. I’m not quite clear on how to make it harder…


The game is fun, had a very interesting match with some random person from the other side of the world, but it would be great if I could create a private lobby just to play this game with a friend over and over again :)


If you and your friend both change the preferences a bit, e.g., grid size, it's very likely that you will match. It's more of a workaround though, I should absolutely put some effort into creating a lobby.


Thanks for the idea, will try it! Thanks for sharing this fun game!


I don't get it. What is the purpose of a "wall" unit? If you just want to fill up a grid, why do you need more than one kind of unit? Is the wall just decorative? It doesn't seem to affect anything at all.


a wall can't be destroyed but can attack like a unit, but it must have reinforcements from another unit behind your lines. So the strategy is to prevent your enemies from being able to make walls by placing your units strategically, and if they do make walls to interrupt their supply lines so they can't attack anymore.


I suggest playing, you'll quickly see it's about strategy of taking and locking squares. Walls can't be taken back and cut off chains to other walls.

Never played before buts it's interesting.


How would you typically mark the walls when playing with pen and paper?


Draw a square around the X or O.


Or just shade it lightly


We shaded it as we usually played with pens of different colors.


I didn't realize at first you get three moves per turn (by default). I kept wondering what trick the bot used to build multiple walls at once.


Game rules are simple, great job to bring it online.


Great job at explaining the rules! Tried it out from my phone, how do I „confirm“ a move? I seem to be unable to actually finish a move.


At least by default you get three moves per turn. Try playing more moves.


What is this game called? I spent many hours during sermons playing this with my siblings, but I am American


It's commonly known as "virus wars".


great polish on the UX.


Thanks!


A pen-and-paper game, and yet all I get is "This web application requires JavaScript to run."

I'm sure there's some kind of interactive demo or something, but do the rules themselves need JS?


You'd get more if you turned on JavaScript I think


The rules don't need JS, I should have probably server-side-rendered them, sorry.


A game like this with a million variations is almost immediately uninteresting. It makes it seem like the rules / strategy aren't fully formed and doesn't feel like something worth learning. The implementation is great though.


Chess has a million variations too...

Some of the more common ones:

- Played seriously: https://en.wikipedia.org/wiki/Fischer_random_chess

- Played socially: https://en.wikipedia.org/wiki/Bughouse_chess

- Played non-seriously: https://en.wikipedia.org/wiki/Losing_chess


Rummy has a million variations and it's great. I'm partial to Brazilian Buraco, but only the specific variant my grandpa taught me ;-)

https://www.pagat.com/rummy/buraco.html


OTOH if all the variations are interesting games in their own right, the family is quite brilliant.


Rummy, whist, euchre, and chess all have many variants.


Au contraire, domino and chess are so mechanic that they're boring. Leave them to the machines


Here’s my super short description for those that have never played.

Draw a grid of dots on some blank paper. Your X, your friend is O.

Start by drawing a line between two adjacent dots, no diagonals (this is a wall). Take it in turns to draw a line between two adjacent dots.

If you draw a line that closes a square (or two!)(the smallest possible square), claim the closed square/s by writing a X inside the claimed square.

Game ends when nothing more to draw, count up your symbols for the winner.


different game




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

Search: