Comments (3)
It's a bit complicated in that some types of variants (like parallel) may not want to have ko evaluated every move. I am now leaning toward a Ko-detector object that will throw if Ko is detected. This fits in with the throw-on-illegal-move paradigm we work with currently, and it's composable.
example:
const ko_detector = new KoDetector();
ko_detector.push({ a: 1 })
ko_detector.push({ a: 2 })
ko_detector.push({ a: 1 }) // KoError: board state repeated
from govariants.
Game state repetitions will be a problem in many variants. In parallel go they just look different. Instead of going back and forth like in a baduk ko, there might be no progress at all. Examples:
- Collisions that result in passes
- All placed stones are captured immediately
But we can always extend the base class with some shared repetition detection and inherit from that extension wherever it is convenient (or find other ways to reuse code).
from govariants.
Yep, I agree that ko will be needed in many variants. Feel free to open an issue for the ones that still need it! (parallel
and maybe @merowin 's graph variant?)
I've tried to make KoDetector
is relatively reusable:
- it is basically a 2-liner (one line for initialization and another for pushing state)
- can be placed anywhere
- each variant has full control over which subset of the state is relevant.
from govariants.
Related Issues (20)
- Server crashes on game request with wrong id
- Quantum Go HOT 5
- [Thue-Morse] Refinements HOT 1
- Take / Leave Seat can cause crash
- Loading Spinner
- ASLI
- hash password before login request HOT 3
- Display player colors or symbols
- Dimensions object
- Adding the following features for go/variants/quantum HOT 6
- Admin users and dashboard
- Migration strategy HOT 4
- Duplicate move on game HOT 1
- Timeout bugs in parallel variant HOT 7
- Display komi and other "invisible" configs HOT 1
- Sequential Fractional Baduk
- Overlapping Layout in game page for variant quantum HOT 3
- Config Not Editable for Variants without a Config Form HOT 1
- Graph expects intersection IDs to equal their index HOT 5
- [optimization] do not re-render board every move HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from govariants.