ovos-skill-chess 0.1.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ovos_skill_chess-0.1.0a1/LICENSE +201 -0
- ovos_skill_chess-0.1.0a1/PKG-INFO +128 -0
- ovos_skill_chess-0.1.0a1/README.md +102 -0
- ovos_skill_chess-0.1.0a1/__init__.py +65 -0
- ovos_skill_chess-0.1.0a1/boardgame.py +440 -0
- ovos_skill_chess-0.1.0a1/controlpanel.json +116 -0
- ovos_skill_chess-0.1.0a1/controlpanel.svg +1 -0
- ovos_skill_chess-0.1.0a1/engine.py +644 -0
- ovos_skill_chess-0.1.0a1/icon.png +0 -0
- ovos_skill_chess-0.1.0a1/icon.svg +1 -0
- ovos_skill_chess-0.1.0a1/locale/ca-ES/chess.json +243 -0
- ovos_skill_chess-0.1.0a1/locale/ca-ES/chess_skill.voc +1 -0
- ovos_skill_chess-0.1.0a1/locale/ca-ES/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/ca-ES/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/ca-ES/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/da-DK/chess.json +284 -0
- ovos_skill_chess-0.1.0a1/locale/da-DK/chess_skill.voc +2 -0
- ovos_skill_chess-0.1.0a1/locale/da-DK/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/da-DK/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/da-DK/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/de-DE/chess.json +248 -0
- ovos_skill_chess-0.1.0a1/locale/de-DE/chess_skill.voc +2 -0
- ovos_skill_chess-0.1.0a1/locale/de-DE/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/de-DE/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/de-DE/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/en-US/chess.json +309 -0
- ovos_skill_chess-0.1.0a1/locale/en-US/chess_skill.voc +2 -0
- ovos_skill_chess-0.1.0a1/locale/en-US/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/en-US/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/en-US/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/es-ES/chess.json +246 -0
- ovos_skill_chess-0.1.0a1/locale/es-ES/chess_skill.voc +1 -0
- ovos_skill_chess-0.1.0a1/locale/es-ES/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/es-ES/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/es-ES/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/eu-ES/chess.json +248 -0
- ovos_skill_chess-0.1.0a1/locale/eu-ES/chess_skill.voc +2 -0
- ovos_skill_chess-0.1.0a1/locale/eu-ES/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/eu-ES/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/eu-ES/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/fr-FR/chess.json +245 -0
- ovos_skill_chess-0.1.0a1/locale/fr-FR/chess_skill.voc +2 -0
- ovos_skill_chess-0.1.0a1/locale/fr-FR/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/fr-FR/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/fr-FR/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/gl-ES/chess.json +244 -0
- ovos_skill_chess-0.1.0a1/locale/gl-ES/chess_skill.voc +1 -0
- ovos_skill_chess-0.1.0a1/locale/gl-ES/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/gl-ES/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/gl-ES/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/it-IT/chess.json +240 -0
- ovos_skill_chess-0.1.0a1/locale/it-IT/chess_skill.voc +1 -0
- ovos_skill_chess-0.1.0a1/locale/it-IT/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/it-IT/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/it-IT/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/nb-NO/chess.json +253 -0
- ovos_skill_chess-0.1.0a1/locale/nb-NO/chess_skill.voc +2 -0
- ovos_skill_chess-0.1.0a1/locale/nb-NO/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/nb-NO/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/nb-NO/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/nl-NL/chess.json +245 -0
- ovos_skill_chess-0.1.0a1/locale/nl-NL/chess_skill.voc +3 -0
- ovos_skill_chess-0.1.0a1/locale/nl-NL/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/nl-NL/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/nl-NL/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/pt-BR/chess.json +245 -0
- ovos_skill_chess-0.1.0a1/locale/pt-BR/chess_skill.voc +1 -0
- ovos_skill_chess-0.1.0a1/locale/pt-BR/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/pt-BR/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/pt-BR/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/pt-PT/chess.json +245 -0
- ovos_skill_chess-0.1.0a1/locale/pt-PT/chess_skill.voc +1 -0
- ovos_skill_chess-0.1.0a1/locale/pt-PT/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/pt-PT/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/pt-PT/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/locale/sv-SE/chess.json +253 -0
- ovos_skill_chess-0.1.0a1/locale/sv-SE/chess_skill.voc +2 -0
- ovos_skill_chess-0.1.0a1/locale/sv-SE/controlpanel.json +25 -0
- ovos_skill_chess-0.1.0a1/locale/sv-SE/play.intent +10 -0
- ovos_skill_chess-0.1.0a1/locale/sv-SE/skill.json +28 -0
- ovos_skill_chess-0.1.0a1/ovos_skill_chess.egg-info/PKG-INFO +128 -0
- ovos_skill_chess-0.1.0a1/ovos_skill_chess.egg-info/SOURCES.txt +174 -0
- ovos_skill_chess-0.1.0a1/ovos_skill_chess.egg-info/dependency_links.txt +1 -0
- ovos_skill_chess-0.1.0a1/ovos_skill_chess.egg-info/entry_points.txt +2 -0
- ovos_skill_chess-0.1.0a1/ovos_skill_chess.egg-info/requires.txt +4 -0
- ovos_skill_chess-0.1.0a1/ovos_skill_chess.egg-info/top_level.txt +1 -0
- ovos_skill_chess-0.1.0a1/picture.py +152 -0
- ovos_skill_chess-0.1.0a1/pyproject.toml +46 -0
- ovos_skill_chess-0.1.0a1/screenshot-portrait.png +0 -0
- ovos_skill_chess-0.1.0a1/screenshot.png +0 -0
- ovos_skill_chess-0.1.0a1/setup.cfg +4 -0
- ovos_skill_chess-0.1.0a1/spoken_numbers.py +132 -0
- ovos_skill_chess-0.1.0a1/tests/test_boardgame.py +134 -0
- ovos_skill_chess-0.1.0a1/tests/test_engine.py +188 -0
- ovos_skill_chess-0.1.0a1/tests/test_locale.py +42 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ovos-skill-chess
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: Chess against Emkay, by voice
|
|
5
|
+
Author: emkay-voice
|
|
6
|
+
Maintainer: Andreas Lorensen
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://github.com/emkay-voice/ovos-skill-chess
|
|
9
|
+
Project-URL: Issues, https://github.com/emkay-voice/ovos-skill-chess/issues
|
|
10
|
+
Project-URL: Emkay, https://github.com/emkay-voice/emkay
|
|
11
|
+
Project-URL: Icon, https://raw.githubusercontent.com/emkay-voice/ovos-skill-chess/main/icon.png
|
|
12
|
+
Keywords: ovos,openvoiceos,skill,voice,assistant,game,board game,emkay,chess,schach,skak
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Games/Entertainment :: Board Games
|
|
18
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: ovos-workshop<10.0.0,>=0.0.15
|
|
23
|
+
Provides-Extra: test
|
|
24
|
+
Requires-Dist: pytest; extra == "test"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# <img src='icon.png' card_color='#3B1F4A' width='50' height='50' style='vertical-align:bottom'/> Chess
|
|
28
|
+
|
|
29
|
+
**Chess against Emkay, by voice.** Say a move as from and to – *"e2 to e4"* – or the piece and the
|
|
30
|
+
square: *"knight to f3"*, *"castle short"*. Emkay says its own moves the same way, so you can play
|
|
31
|
+
on the screen – or on your own board, and move Emkay's pieces as it says. Easy, normal or hard,
|
|
32
|
+
white or black. Made for [Emkay](https://emkay.ai), works on any OpenVoiceOS.
|
|
33
|
+
|
|
34
|
+
<img src='screenshot.png' alt='Chess on a lying screen' height='300'/> <img src='screenshot-portrait.png' alt='Chess on a standing screen' height='300'/>
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
"play chess" "start chess over" "play chess as black"
|
|
40
|
+
"e2 to e4" "knight to f3" "castle short" "a7 to a8 knight"
|
|
41
|
+
"g1" (where can it go?) "undo"
|
|
42
|
+
"give me a hint" "what was your move?" "how many pieces?"
|
|
43
|
+
"play an easy chess" "show the rules" "I resign" "stop playing"
|
|
44
|
+
|
|
45
|
+
"spil skak", "e2 til e4", "springer til f3", "rokade kort", "fortryd",
|
|
46
|
+
"giv mig et tip", "spil skak som sort", "vis reglerne" (Danish)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
When two pieces can go to the square you said, Emkay asks which one – *"the knight from b1 or the
|
|
50
|
+
knight from f1?"*. Say only a square with a piece of yours on it, and Emkay tells where it can go.
|
|
51
|
+
A pawn on the last row becomes a queen, unless you name another piece.
|
|
52
|
+
|
|
53
|
+
While you play, everything you say goes to the game first – before any other skill – until you
|
|
54
|
+
say *stop* or *stop playing* (the game is saved), or a few minutes pass in silence.
|
|
55
|
+
|
|
56
|
+
## On a real board
|
|
57
|
+
|
|
58
|
+
Emkay tells every move fully, so you can make it on the board for it: *"I move the knight from g8 to
|
|
59
|
+
f6 and take the pawn."* – *"I castle short: the king from e8 to g8, and the rook from h8 to f8."* –
|
|
60
|
+
*"En passant – take away the pawn on d5."* – *"The pawn becomes a queen."* – *"Check!"*. Made a
|
|
61
|
+
mistake, or heard Emkay wrong? *Undo* takes back your last move and Emkay's.
|
|
62
|
+
|
|
63
|
+
## The rules
|
|
64
|
+
|
|
65
|
+
*"Show the rules"* puts them on the screen as a page of their own, and Emkay reads them. They are on
|
|
66
|
+
the skill's page in the control panel too. All of chess is there: castling (not out of, through or
|
|
67
|
+
into check), en passant, promotion, check, checkmate and stalemate – and the draws by threefold
|
|
68
|
+
repetition, the fifty-move rule and too little material to mate.
|
|
69
|
+
|
|
70
|
+
## Emkay's play
|
|
71
|
+
|
|
72
|
+
Emkay's chess is its own, in plain Python: a move generator checked against the known
|
|
73
|
+
[perft](https://www.chessprogramming.org/Perft_Results) counts, and an alpha-beta search with
|
|
74
|
+
quiescence and piece-square tables. On *easy* it looks one move ahead and errs now and then on
|
|
75
|
+
purpose; on *normal* it thinks about two seconds, on *hard* about four – it searches as deep as the
|
|
76
|
+
time allows. It is not Stockfish, but it seldom leaves a piece hanging, and it sees a short mate coming.
|
|
77
|
+
*"Give me a hint"* asks it for a good move of yours.
|
|
78
|
+
|
|
79
|
+
## "Play ..." and OCP
|
|
80
|
+
|
|
81
|
+
OpenVoiceOS lets its media player (OCP) answer every *play ...*. So Chess is a common play skill
|
|
82
|
+
too: when OCP searches for "chess", the skill answers with the game (`MediaType.GAME`), and OCP hands
|
|
83
|
+
it over. When the game ends, OCP is told, so *pause*, *next* and *play* are the music's again.
|
|
84
|
+
|
|
85
|
+
## Saved as you go
|
|
86
|
+
|
|
87
|
+
After every move the game is saved – on the device, and with My Emkay for your other devices too.
|
|
88
|
+
*Stop playing*, and *play chess* goes on where you were. *Start chess over* starts again.
|
|
89
|
+
|
|
90
|
+
## Pictures
|
|
91
|
+
|
|
92
|
+
The board seen from your side – turned round when you play black – with the files and ranks along
|
|
93
|
+
the edges, the pieces drawn as plain shapes (no chess font needed), the last move marked from and
|
|
94
|
+
to, a king in check ringed in red, and next to each side the pieces it has taken. One plain SVG, so
|
|
95
|
+
it shows on every screen, the Mark II's too. On a standing screen – Emkay on a phone – the board
|
|
96
|
+
stands too. No background music.
|
|
97
|
+
|
|
98
|
+
## Settings
|
|
99
|
+
|
|
100
|
+
In the control panel (*Chess*, under Everyday): the game on now or the saved one, start it on the
|
|
101
|
+
device, start over, stop – and **You play** (white or black), **Show pictures** and **Layout**
|
|
102
|
+
(`auto`, `portrait`, `landscape`).
|
|
103
|
+
|
|
104
|
+
## For developers
|
|
105
|
+
|
|
106
|
+
The rules and Emkay's play (`engine.py`) are plain Python with no OVOS in it:
|
|
107
|
+
`Game(new_game(), words).handle("e2 to e4")`; `perft(from_fen(fen), depth)` counts positions. The
|
|
108
|
+
game is a small dict that is saved as JSON. The words of each language are in
|
|
109
|
+
`locale/<lang>/chess.json`; spoken numbers are in `spoken_numbers.py`. `boardgame.py` is what every
|
|
110
|
+
board game of emkay-voice does the same way.
|
|
111
|
+
|
|
112
|
+
## Languages
|
|
113
|
+
|
|
114
|
+
Catalan, Danish, Dutch, English, French, Galician, German, Italian, Norwegian (bokmål), Portuguese
|
|
115
|
+
(Brazil and Portugal), Spanish, Swedish and Basque. Everything except English and Danish is machine
|
|
116
|
+
translated and only loosely read through by a native Dane – corrections are very welcome.
|
|
117
|
+
|
|
118
|
+
## Category
|
|
119
|
+
|
|
120
|
+
**Entertainment**
|
|
121
|
+
|
|
122
|
+
## Tags
|
|
123
|
+
|
|
124
|
+
#game #boardgame #chess #emkay
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
Apache-2.0. Made by [emkay-voice](https://github.com/emkay-voice), maintained by Andreas Lorensen.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# <img src='icon.png' card_color='#3B1F4A' width='50' height='50' style='vertical-align:bottom'/> Chess
|
|
2
|
+
|
|
3
|
+
**Chess against Emkay, by voice.** Say a move as from and to – *"e2 to e4"* – or the piece and the
|
|
4
|
+
square: *"knight to f3"*, *"castle short"*. Emkay says its own moves the same way, so you can play
|
|
5
|
+
on the screen – or on your own board, and move Emkay's pieces as it says. Easy, normal or hard,
|
|
6
|
+
white or black. Made for [Emkay](https://emkay.ai), works on any OpenVoiceOS.
|
|
7
|
+
|
|
8
|
+
<img src='screenshot.png' alt='Chess on a lying screen' height='300'/> <img src='screenshot-portrait.png' alt='Chess on a standing screen' height='300'/>
|
|
9
|
+
|
|
10
|
+
## Examples
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
"play chess" "start chess over" "play chess as black"
|
|
14
|
+
"e2 to e4" "knight to f3" "castle short" "a7 to a8 knight"
|
|
15
|
+
"g1" (where can it go?) "undo"
|
|
16
|
+
"give me a hint" "what was your move?" "how many pieces?"
|
|
17
|
+
"play an easy chess" "show the rules" "I resign" "stop playing"
|
|
18
|
+
|
|
19
|
+
"spil skak", "e2 til e4", "springer til f3", "rokade kort", "fortryd",
|
|
20
|
+
"giv mig et tip", "spil skak som sort", "vis reglerne" (Danish)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
When two pieces can go to the square you said, Emkay asks which one – *"the knight from b1 or the
|
|
24
|
+
knight from f1?"*. Say only a square with a piece of yours on it, and Emkay tells where it can go.
|
|
25
|
+
A pawn on the last row becomes a queen, unless you name another piece.
|
|
26
|
+
|
|
27
|
+
While you play, everything you say goes to the game first – before any other skill – until you
|
|
28
|
+
say *stop* or *stop playing* (the game is saved), or a few minutes pass in silence.
|
|
29
|
+
|
|
30
|
+
## On a real board
|
|
31
|
+
|
|
32
|
+
Emkay tells every move fully, so you can make it on the board for it: *"I move the knight from g8 to
|
|
33
|
+
f6 and take the pawn."* – *"I castle short: the king from e8 to g8, and the rook from h8 to f8."* –
|
|
34
|
+
*"En passant – take away the pawn on d5."* – *"The pawn becomes a queen."* – *"Check!"*. Made a
|
|
35
|
+
mistake, or heard Emkay wrong? *Undo* takes back your last move and Emkay's.
|
|
36
|
+
|
|
37
|
+
## The rules
|
|
38
|
+
|
|
39
|
+
*"Show the rules"* puts them on the screen as a page of their own, and Emkay reads them. They are on
|
|
40
|
+
the skill's page in the control panel too. All of chess is there: castling (not out of, through or
|
|
41
|
+
into check), en passant, promotion, check, checkmate and stalemate – and the draws by threefold
|
|
42
|
+
repetition, the fifty-move rule and too little material to mate.
|
|
43
|
+
|
|
44
|
+
## Emkay's play
|
|
45
|
+
|
|
46
|
+
Emkay's chess is its own, in plain Python: a move generator checked against the known
|
|
47
|
+
[perft](https://www.chessprogramming.org/Perft_Results) counts, and an alpha-beta search with
|
|
48
|
+
quiescence and piece-square tables. On *easy* it looks one move ahead and errs now and then on
|
|
49
|
+
purpose; on *normal* it thinks about two seconds, on *hard* about four – it searches as deep as the
|
|
50
|
+
time allows. It is not Stockfish, but it seldom leaves a piece hanging, and it sees a short mate coming.
|
|
51
|
+
*"Give me a hint"* asks it for a good move of yours.
|
|
52
|
+
|
|
53
|
+
## "Play ..." and OCP
|
|
54
|
+
|
|
55
|
+
OpenVoiceOS lets its media player (OCP) answer every *play ...*. So Chess is a common play skill
|
|
56
|
+
too: when OCP searches for "chess", the skill answers with the game (`MediaType.GAME`), and OCP hands
|
|
57
|
+
it over. When the game ends, OCP is told, so *pause*, *next* and *play* are the music's again.
|
|
58
|
+
|
|
59
|
+
## Saved as you go
|
|
60
|
+
|
|
61
|
+
After every move the game is saved – on the device, and with My Emkay for your other devices too.
|
|
62
|
+
*Stop playing*, and *play chess* goes on where you were. *Start chess over* starts again.
|
|
63
|
+
|
|
64
|
+
## Pictures
|
|
65
|
+
|
|
66
|
+
The board seen from your side – turned round when you play black – with the files and ranks along
|
|
67
|
+
the edges, the pieces drawn as plain shapes (no chess font needed), the last move marked from and
|
|
68
|
+
to, a king in check ringed in red, and next to each side the pieces it has taken. One plain SVG, so
|
|
69
|
+
it shows on every screen, the Mark II's too. On a standing screen – Emkay on a phone – the board
|
|
70
|
+
stands too. No background music.
|
|
71
|
+
|
|
72
|
+
## Settings
|
|
73
|
+
|
|
74
|
+
In the control panel (*Chess*, under Everyday): the game on now or the saved one, start it on the
|
|
75
|
+
device, start over, stop – and **You play** (white or black), **Show pictures** and **Layout**
|
|
76
|
+
(`auto`, `portrait`, `landscape`).
|
|
77
|
+
|
|
78
|
+
## For developers
|
|
79
|
+
|
|
80
|
+
The rules and Emkay's play (`engine.py`) are plain Python with no OVOS in it:
|
|
81
|
+
`Game(new_game(), words).handle("e2 to e4")`; `perft(from_fen(fen), depth)` counts positions. The
|
|
82
|
+
game is a small dict that is saved as JSON. The words of each language are in
|
|
83
|
+
`locale/<lang>/chess.json`; spoken numbers are in `spoken_numbers.py`. `boardgame.py` is what every
|
|
84
|
+
board game of emkay-voice does the same way.
|
|
85
|
+
|
|
86
|
+
## Languages
|
|
87
|
+
|
|
88
|
+
Catalan, Danish, Dutch, English, French, Galician, German, Italian, Norwegian (bokmål), Portuguese
|
|
89
|
+
(Brazil and Portugal), Spanish, Swedish and Basque. Everything except English and Danish is machine
|
|
90
|
+
translated and only loosely read through by a native Dane – corrections are very welcome.
|
|
91
|
+
|
|
92
|
+
## Category
|
|
93
|
+
|
|
94
|
+
**Entertainment**
|
|
95
|
+
|
|
96
|
+
## Tags
|
|
97
|
+
|
|
98
|
+
#game #boardgame #chess #emkay
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
Apache-2.0. Made by [emkay-voice](https://github.com/emkay-voice), maintained by Andreas Lorensen.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Copyright 2026 emkay-voice
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Chess against Emkay, by voice.
|
|
16
|
+
|
|
17
|
+
"Play chess" - you play white (or black, if you ask), Emkay the other side.
|
|
18
|
+
Say a move as from and to - "e2 to e4" - or the piece and the square:
|
|
19
|
+
"knight to f3", "castle short". Emkay says its moves - play on the screen,
|
|
20
|
+
or on your own board and move Emkay's pieces as it says. "Undo" takes a
|
|
21
|
+
move back, "hint" suggests one. Easy, normal and hard. The rules and
|
|
22
|
+
Emkay's play are its own plain Python. The game is saved as you go - also
|
|
23
|
+
for your other devices with My Emkay. Made for Emkay, works on any
|
|
24
|
+
OpenVoiceOS."""
|
|
25
|
+
from .boardgame import BoardGameSkill, normalize
|
|
26
|
+
from .engine import Game, new_game
|
|
27
|
+
from .picture import compose
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ChessSkill(BoardGameSkill):
|
|
31
|
+
WORDS = "chess.json"
|
|
32
|
+
VOC = "chess_skill"
|
|
33
|
+
BUS = "chess"
|
|
34
|
+
URI = "chess:game"
|
|
35
|
+
ICON = "https://raw.githubusercontent.com/emkay-voice/ovos-skill-chess/main/icon.png"
|
|
36
|
+
BACKGROUND = "#12161c"
|
|
37
|
+
DEFAULTS = {"pictures": True, "layout": "auto", "colour": "white"}
|
|
38
|
+
|
|
39
|
+
def _choice(self, utterance, key):
|
|
40
|
+
said = f" {normalize(utterance)} "
|
|
41
|
+
for name, spoken in self._words().get(key, {}).items():
|
|
42
|
+
if any(f" {normalize(w)} " in said for w in spoken):
|
|
43
|
+
return name
|
|
44
|
+
return None
|
|
45
|
+
|
|
46
|
+
def wants_new(self, utterance):
|
|
47
|
+
return bool(utterance) and bool(self._choice(utterance, "levels") or self._choice(utterance, "colours"))
|
|
48
|
+
|
|
49
|
+
def new_game(self, utterance=""):
|
|
50
|
+
colour = self._choice(utterance, "colours") or self.setting("colour")
|
|
51
|
+
you = "b" if colour == "black" else "w"
|
|
52
|
+
return new_game(you, self._choice(utterance, "levels") or "normal")
|
|
53
|
+
|
|
54
|
+
def make_game(self, g):
|
|
55
|
+
return Game(g, self._words())
|
|
56
|
+
|
|
57
|
+
def picture(self, game, portrait):
|
|
58
|
+
return compose(game.g, game.words, game.words["title"], portrait=portrait)
|
|
59
|
+
|
|
60
|
+
def panel_status(self, g):
|
|
61
|
+
words = self._words()
|
|
62
|
+
game = Game(g, words)
|
|
63
|
+
colour = "white" if g["you"] == "w" else "black"
|
|
64
|
+
return {"pieces": f"{game.count(g['you'])} – {game.count('b' if g['you'] == 'w' else 'w')}",
|
|
65
|
+
"colour": words.get("cp_colour", {}).get(colour, colour)}
|