Pravda

home
Login

home

Social games for a social network.

The purpose of this project, somewhat teasingly called Pravda, is to develop a bot for the fediverse that can run a series of social games. By social games, I mean games where social interaction is at the centre, and where the strategic notion of yomi--the ability to predict other people's behaviour--is key. The name of pravda alludes to the slipperiness of the truth in these types of games.

So far these are the games I'm planning to include, in rough order of complexity:

Ultimately it would be nice to run a nomic game on the fedi too, but that might not be so easy to do with a bot.

How to use.

It's out now. This doesn't mean the bot is bug-free, but it should operate properly. If you get any bugs please tell me at @modulux@node.isonomia.net.

To start a rock, Paper, Scissors game: rps.

Any time during the game, cancel with cancelrps.

For each choice use rock, paper, or scissors.

To throw dice: dice. By default, a 6-sided dice is thrown.

To throw n dice: dice n, where n must be a number. For example: dice 4.

To throw n numbers of m-sided dice: dice ndm. Both n and m must be numbers. For example: dice 3d20 will throw 3 20-sided dice.

Results are not disaggregated, but summed up.

The bot sends the commands in asterisks to indicate that those are the precise commands it accepts. You do not need to, and in fact must not, put them in asterisks.

Other than mentions, which are cleaned up, do not put anything else on the toots or the bot won't recognise the commands. To clarify: you can mention the bot and another user and send a command, for example to invite someone to a game. Please don't annoy people by doing this. As a convenience, the bot's commands are case-insensitive. It will accept rock, ROCK, Rock, RocK and so on.

The bot does not keep any scores or data. There's a primitive facility to log output into a text file for debugging purposes only.

Have fun!

Tech stack.

The bot is written in Rust, using the mastodon-async crate to talk to Mastodon, and tokio as its async runtime.

I'll be submitting commits as I go, and I am definitely willing to accept help. If this sounds interesting, contact me. I'm @modulux@node.isonomia.net on the fedi.

How to get the source:

This project is run through fossil since I don't like and don't understand git.

You can clone this project by downloading fossil and using the following command, in the directory where you want to clone:

fossil clone https://modulus.isonomia.net/pravda.cgi

You can also get this as a rust crate, from crates.io, though only certain releases will be pushed. You can use:

cargo install pravda

or if you want it as a dependency:

cargo add pravda

Finally, this website has access to the source as it is being developed. You can get the timeline of commits, or on the top see the branches, files, etc.

Download the last stable version here. This is the same version running on my bot, @socialgames@botsin.space.

More development documentation is available on the project README.