A discussion on improving the dice rolling feature in discourse-narrative-bot has started. neemiasvf proposed a pull request to enable complex dice rolls with formulas, but sam pointed out that Discourse AI already has a capable dice roller. random_picker_bot demonstrated its ability to roll dice and pick random names, with sam highlighting the advantage of not needing special syntax. However, Ed_S raised concerns about the system’s randomness and potential biases. maiki addressed these concerns by sharing the randomizing code, which uses procedural code instead of relying on language models. merefield noted a similar approach in Chatbot, where deterministic functions are used for math operations instead of leaving it to chance.
Although @discobot has a dice roller, it’s too simple. It’s not yet capable of rolling complex dice and formulas for specific needs. So, I’d like to improve this feature and make it possible to run dice like 1d20+5, 1d20+2 + 2d12-1, 5d10k2 and so on…
I submitted this PR and would very much appreciate reviews and thoughts about it. Thanks!
Picking from ["Whiskers,Mittens,Socks,Shadow,Simba,Leo,Oliver,Luna,Bella,Max"], picked: ["Shadow"]
For your adventurous roll of 1d20+5, the dice landed on a 5, which adds up to a grand total of 10!
And for your future feline friend, the Random Picker has decreed its name shall be Shadow. Sounds like a kitty destined for stealthy midnight adventures, doesn’t it?
The big advantage here is that you don’t need to learn any special syntax, GPT-4 just figures it out for you. It can make dice rolling a tad expensive, but GPT 3.5 does a reasonable job as well.
Ah, many thanks. I had naively assumed the LLM was doing the work - being plumbed into some procedural code is a different story and in this case the right answer!