37
votes
Accepted
The Game of Hex in Mathematica
The flow in my program is:
I have one global variable, board, which is an 11x11 matrix. Each matrix element corresponds to a hexagon on the board.
I pass the board ...
- 69.3k
32
votes
Accepted
Can Mathematica put these puzzle pieces together?
Assuming polygons follow the same (clockwise or counterclockwise) vertex order, find all good quality two line segment rigid mappings between polygons without overlap with each other (at least much ...
- 18.3k
25
votes
Accepted
Programming the fiver game
In this case I don't know how to post something helpful without providing full code so I'll just do that and hope this wasn't homework. My emphasis is on clarity (hopefully) rather than brevity or ...
- 267k
22
votes
Can Mathematica put these puzzle pieces together?
For a different approach with image processing, I start with the image of your puzzle.
...
- 15.7k
21
votes
Accepted
Minesweeper: How to Dynamic a lot of graphics with high-speed?
The issue with such multicontroller dynamic interfaces is that one usually wants to store the state of all controllers in one variable for convenience (e.g. store status of position ...
- 46.3k
20
votes
The Game of Hex in Mathematica
Here is an answer that provides modular definitions that allow
plotting the play-table and players moves with different options, and
testing for a complete path by a player.
(The function ...
- 36.5k
13
votes
Sophisticated API integrations / Making a card game in Mathematica
This will be an answer in two parts. The first is how to build out a sophisticated, stateful ServiceConnection.
The second is how to use this to build out an ...
- 46.1k
13
votes
The Game of Hex in Mathematica
Mostly working, just don't click the intersections. I seemed to have reversed the colours, but that's easily fixed, just set re and ...
- 8,547
11
votes
Accepted
Hanoi Tower minimum moves between any two states
We start with a better abc encoding (the one shown on your graph picture). State aabcac means: on first rod (rod a), there are ...
- 960
9
votes
Programming the fiver game
Here is a version that uses only the Front End, which can be verified using LinkSnooper. This is mostly a useless optimisation/exploration.
...
- 12.1k
8
votes
Accepted
How to generate optimal solution and order the rest
First, let's define the edges of this graph:
...
- 9,243
8
votes
Accepted
How can I efficiently calculate exact probability distributions for D&D dice like "4d8"?
Based on eyorble's comment here's how to do it with generating functions. The main idea: with some probability distribution $p_n: P(X=n)=p_n$ you can associate a polynomial called the generating ...
7
votes
How to plot a coalition game?
For this particular setup and aiming to produce ternary plot that represents game:
...
- 56k
7
votes
How can I efficiently calculate exact probability distributions for D&D dice like "4d8"?
Implementing @eyorble's idea in the comments:
problist[n_, d_] := Rest[CoefficientList[(1/d Sum[x^i, {i, 1, d}])^n, x]]
This returns a list of length $nd$ ...
- 13.9k
6
votes
TuGames package does not run
In order to avoid in the future any annoying error message that has been mentioned above while following a manual installation that does not respect best practice of publicizing a Mathematica package, ...
6
votes
The Game of Hex in Mathematica
Dead end
When I first saw this question I immediately thought of a Voronoi diagram because it is so easy to do this:
...
- 267k
5
votes
How can I efficiently calculate exact probability distributions for D&D dice like "4d8"?
Define two helper functions. One for the generator function of NdS expressed as a polynomial in terms of $x$:
dg[x_, n_, s_] := (x (x^s - 1)/(x - 1))^n;
And ...
- 9,243
5
votes
Chess in Mathematica
Wolfram Language 13.2 has a built-in preliminary support for chess. You can import PGN files and FEN strings, render positions as graphics, process game metadata, display dynamic game summary and more....
- 1,304
5
votes
webmathematica to share my game?
This applies to any Wolfram Cloud based web application, not simply to your question, but there are say 4 steps involved in creating a web app. Hopefully some of this carries over from WC to ...
- 46.1k
5
votes
Convert image of graph to Graph
On my system, MorphologicalGraph with the default Method can't seem to find all the vertices of the graph. I ended up with the ...
- 127k
5
votes
How to plot a coalition game?
I recommend to use my Mathematica Package TuGames Version 2.3 that can plot the core for 3- as well as for 4-person coalitional games. The package for Mathematica Version 8 and higher can be found ...
4
votes
Accepted
Can Mathematica help me win my on-line game?
Running the code below, which shows the results for runs of 1000 shots, the rewards as set mean you should always take the 100% shot. With different rewards you could add a condition to take a ...
- 30.4k
3
votes
Can Mathematica help me win my on-line game?
I know I'm a billion years late on this, and an answer now won't do anyone any good, but I found it really interesting for some reason. I'm not great with probabilities, but my reasoning seemed to ...
- 10k
2
votes
How can I improve my prediction for the end time of the Reddit button game?
You are attempting to model a non-linear process with a linear model. Use a non-linear model. For example:
...
- 40.7k
2
votes
2
votes
2
votes
Accepted
Plot of TU game on Windows
To compute the barycenter of the extreme points of the core, I recommend to apply my Mathematica Package TuGames that can be downloaded from the following URL
Mma Package TuGames
To install the ...
2
votes
Accepted
Is it possible to create Android App Bundle (aab) for Google play with Wolfram language/Mathematica?
Wolfram Inc. changes this concept rather often but since some time the API are gathered into the Wolfram Alpha Pro product. The central page for product information is https://products.wolframalpha....
- 3,782
1
vote
Number guessing game to 1-100
How about something like this, with tolerance plus minus 5 and a SeedRandom to control the random numbers?
...
- 1,513
1
vote
code in mathematica for the game of guessing
Here you have a minimal solution to get you started.
...
- 7,848
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
game × 37programming × 6
plotting × 5
list-manipulation × 4
graphs-and-networks × 3
mathematical-optimization × 3
probability-or-statistics × 3
performance-tuning × 2
image-processing × 2
dynamic × 2
packages × 2
gui-construction × 2
machine-learning × 2
neural-networks × 2
webmathematica × 2
recreational-mathematics × 2
equation-solving × 1
graphics × 1
matrix × 1
function-construction × 1
manipulate × 1
graphics3d × 1
export × 1
fitting × 1
import × 1