Balanced diversity solver xoxo to the square.
Project description
xoxo
Balanced diversity solver xoxo to the square.
Documentation
User and developer documentation of xoxo.
Bug Tracker
Feature requests and bug reports are bested entered in the todos of xoxo.
Primary Source repository
The primary source repository of xoxo is at sourcehut a collection of tools useful for software development.
Example
Given the input file:
❯ cat test/fixtures/grid_s_1.txt
O
X
OX X
XX
OO
XXO
for clarity showing the dump to expose the regularity:
❯ xxd -c 7 test/fixtures/grid_s_1.txt
00000000: 4f20 2020 2020 0a O .
00000007: 5820 2020 2020 0a X .
0000000e: 4f58 2020 2058 0a OX X.
00000015: 2058 5820 2020 0a XX .
0000001c: 2020 204f 4f20 0a OO .
00000023: 5858 4f20 2020 0a XXO .
xoxo
will try to solve the puzzle in a diverse but balanced way:
❯ xoxo test/fixtures/grid_s_1.txt
Problem:
,---+---+---+---+---+---,
| O | | | | | | 1
|---+---+---+---+---+---|
| X | | | | | | 2
|---+---+---+---+---+---|
| O | X | | | | X | 3
|---+---+---+---+---+---|
| | X | X | | | | 4
|---+---+---+---+---+---|
| | | | O | O | | 5
|---+---+---+---+---+---|
| X | X | O | | | | 6
*---+---+---+---+---+---*
1 2 3 4 5 6
Solution:
,---+---+---+---+---+---,
| O | O | X | O | X | X | 1
|---+---+---+---+---+---|
| X | O | O | X | X | O | 2
|---+---+---+---+---+---|
| O | X | O | X | O | X | 3
|---+---+---+---+---+---|
| O | X | X | O | X | O | 4
|---+---+---+---+---+---|
| X | O | X | O | O | X | 5
|---+---+---+---+---+---|
| X | X | O | X | O | O | 6
*---+---+---+---+---+---*
1 2 3 4 5 6
More in the usage documentation
Status
Experimental.
Note The default branch is default
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xoxo-2022.8.4.tar.gz
(16.1 kB
view hashes)
Built Distribution
Close
Hashes for xoxo-2022.8.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a54654dcfc2fca5edff71e2330e9f924eae3667d55e1cbed0e7d9691a93aab56 |
|
MD5 | e429a53f542601422bfd1ed67bfca264 |
|
BLAKE2b-256 | 1ced4522f9ba4d4c876f7dd53514700276fc58e99fdf670f39456d81a2b80061 |