aboutsummaryrefslogtreecommitdiff
path: root/TODO.md
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-04-11 18:57:22 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-04-11 18:57:22 +0200
commit3cb60bcbf4ab9af4e9452a43681f1e7176b0c88f (patch)
tree22039c5bfafcb352b4f3ce8af38acd34c152b1a7 /TODO.md
parentfc41f7917531693680b5baf71ffe38c47333fe84 (diff)
downloadnissy-core-3cb60bcbf4ab9af4e9452a43681f1e7176b0c88f.tar.gz
nissy-core-3cb60bcbf4ab9af4e9452a43681f1e7176b0c88f.zip
Added TODO.mdHEADmaster
Diffstat (limited to 'TODO.md')
-rw-r--r--TODO.md191
1 files changed, 191 insertions, 0 deletions
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000..d30bdf9
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,191 @@
1# Ideas, improvements, things that I may never do...
2
3This document contains a list of ideas for possible new features or
4improvements to nissy-core. This file used to be private, but it makes
5more sense to have it public, in case someone else wants to contribute.
6
7## Priorities
8
9Items in this section are what I consider top priorities. They enable or
10simplify using nissy-core as a library inside other projects.
11
12### Python packaging and distribution
13
14Make a [PyPI](https://pypi.org/) package for nissy-core. There is already
15a Python module in the `python/` folder, and it builds both on UNIX and on
16Windows, so this should not require too much work. It is also possible to
17make this process automatic using GitHub actions or something similar.
18
19The documentation of the Python module should also be improved.
20
21### WASM interface improvements
22
23Currently there is a proof-of-concept web version for the H48 optimal
24solver (see [h48.tronto.net](https://h48.tronto.net) - it is based on
25a very old version of the solver). This needs some polishing, namely:
26
27* The main thing we want to do is enabling downloading the pruning tables
28in small pieces and show a progress bar of some sort. The best way to do
29this would probably be handling all the data storage logic in JavaScript
30code (`http/worker.mjs`) rather than in C++ (`storage.cpp`). With this,
31we should also be able to remove the `-sASYNCIFY` and `-sFETCH` options
32from the Emscripten build command.
33* Table generation can be removed from the web version.
34* Logging can also be simplified by just using `console.log`. We will then
35loose the ability to show the log pane in the HTML page, but this is not
36very interesting to the user. If future applications based on nissy-core
37want to notify the user of the status of the solver, we can handle this
38later with callback parameters to the solve function.
39* For now it is fine to stick to 32-bit WASM and limit ourselves to 1.8GB
40tables at most.
41
42If possible, it would be nice to publish a nissy-core package on
43[NPM](https://www.npmjs.com/).
44
45### Improved documentation
46
47Currently, there is documentation in multiple places, like the `doc/`
48folder and the `nissy.h` header. This documentation should be expanded
49into a sort of "developer guide" for contributing to the project.
50Some critical parts of the code base could also be better commented.
51
52For example, a list of instructions for implementing a new solver can
53be useful.
54
55## Turning this into a usable application
56
57There are at least three ways to turn this into a useful tool for FMC
58training. I don't know if I want to work on any of these in the near
59future - they are all up for grabs!
60
61### CLI application
62
63The easiest interface to make for nissy-core is a command line
64one. This can be done be either improving on the shell in this
65repository (see `shell/`), or by plugging this library into the old
66[nissy](https://nissy.tronto.net). In either case, the result would not
67be much different from the latest version of nissy-classic: there would
68be a faster optimal solver, but some other features may be missing.
69
70### Desktop application
71
72It is easy to use nissy-core as a library in a C or C++ based
73application. I have some examples using the QT framework in
74[qt-experiments](https://github.com/sebastianotronto/qt-experiments)
75(note: the examples there are based on a very old version of nissy-core).
76
77Distribution could be a bit of a pain, especially for Linux. That's why
78I would personally prefer making a TUI-based application. For example,
79[termbox2](https://github.com/termbox/termbox2) could be a good library
80for this, if they implement Windows support.
81
82Yet another option is using Python (for example with QT, via
83[PySide6](https://doc.qt.io/qtforpython-6/)).
84
85### Web application
86
87Since nissy-core builds to WebAssembly, it is possible to use it as a
88library for a WebApp. This would run entirely in the user's browser,
89like [h48.tronto.net](https://h4.tronto.net).
90
91It would also be nice to turn it into an installable PWA, see [this
92repository](https://github.com/chr15m/minimal-pwa) for a minimal example.
93
94## Additional features
95
96Possible new features for nissy.
97
98### Additional solvers
99
100More solvers, or options for current solvers, can be added:
101
102* Finish from HTR. This is available in nissy-classic and it is not hard
103 to implement.
104* Direct HTR, without having DR or EO. This can be useful for finding HTR
105 trigger that break DR. The pruning table for this one is too big, but
106 we can take advantage of the H48 tables.
107* Floppy reduction.
108* JZP / Axial reduction, from EO or direct.
109* Slice solver, using
110 [VR](https://www.youtube.com/watch?v=8SHjQtvuz5Q&list=PL0DmWpJUeHN-o0OKYhDe7w8O6GahIvOtx&index=2).
111* Finish / leave double slice from JZP. This is a different type of solver,
112 because we want to look from both sides for increasingly long solutions
113 and meet in the middle. Similarly, we may also want to implement a
114 "leave double slice" and a "solve double slice" steps.
115* Finish / HTR / JZP finish / leave slice etc... with minimal number of
116 quarter turns.
117
118### Coordinate solvers improvements
119
120The coordinate solvers do not support pause / resume / stop via callback
121function. This is not too hard to add (just copy what the H48 solver is doing),
122but also not too useful, as coordinate solvers are generally very fast.
123
124## Performance improvements
125
126I have worked a lot on performance, but some things can still be improved.
127
128### H48 performance improvements
129
130The only idea I have left for improving the performance of the H48 optimal
131solver is implementing *microthreading*. This means making the main
132solve DFS iterative, and working on multiple DFS branches at the same
133time on the same physical thread. The end goal is taking advantage of
134[prefetching](https://sebastiano.tronto.net/blog/2026-01-28-prefetch/)
135even further.
136
137### Coordinate solvers
138
139Neither the solve algorithm nor the pruning table generation for
140coordinate solver is parallelized. It should not be hard to do (just
141copy what is done for the H48 optimal solver), but coordinate solvers
142are generally small and fast. Parallelized pruning table generation
143could save some time though.
144
145### Cube analysis
146
147A new API function can be added to analyze a given cube position.
148Example of analysis are:
149
150* HTR state. Should return a short name for the HTR case.
151* EO state (no NISS). First a nomenclature for EO cases should be defined.
152* ARM subsets.
153* VR case.
154
155## Technical improvements
156
157I lumped together here a bunch of possible improvements that would not
158affect the use of the library much, but can still be useful or interesting
159for developers.
160
161### On-line (internal) documentation
162
163Currently the only way to know which solvers are available is reading the
164`doc/solver.md` page. There should be an API function to list available
165solvers. Same thing for variations.
166
167In general, there should be more documentation available from within
168the library itself.
169
170### Python pause / stop / resume
171
172The pause / stop / resume via callback functionality for the H48 optimal
173solver is not supported in the Python module. I tried to make it to work,
174but I had some issues which I suspect were related to the GIL and the
175fact the the solver is multi-threaded. However, I get the exact same
176issues with no-GIL versions of Python.
177
178I have tried calling the callback function from within an `ALLOW_THREADS`
179block, but I get a segfault. If I remove the `ALLOW_THREADS` blocks,
180the program hangs indefinitely.
181
182Good luck debugging this.
183
184### Better Windows development support
185
186The build script for Windows has fewer options than the UNIX one. For
187example, to configure the maximum number of threads a developer would
188have to manually edit the build script.
189
190I'll leave this one to anyone who actually wants to work on nissy-core
191from Windows.

Generated with cgit - Back to sebastiano.tronto.net