Code Monkey home page Code Monkey logo

semantle's Introduction

trophies

If you find my projects useful, please consider becoming a sponsor. Everything here comes from my free time, and is released under permissive licenses (e.g. MIT). Your contribution helps fund open-source AI.

buymeacoffee

semantle's People

Contributors

fkodom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kylewis-dev

semantle's Issues

Solver.recommend() calls _get_words_closest_to_mean() with empty "words" tuple

Hello,

First, thanks for developing this tool, it is quite funny to see how fast it solves Semantle games :)

However, I stumble upon this behaviour:

$ .local/bin/solve-semantle
Semantle Solver!

Step 1
----------------
157244 solutions remaining
Recommended: object
Alternatives: [person, place, action, adjective]
----------------
Enter your guess: hello
What was the similarity? 4.04

Step 2
----------------
306 solutions remaining
Recommended: neuroanatomical
Alternatives: [mupirocin, lymphocytic, recombinants, amisulpride, bullae]
----------------
Enter your guess: neuroanatomical
What was the similarity? -0.68
~/.local/lib/python3.10/site-packages/semantle/solver.py:81: RuntimeWarning: Mean of empty slice.
  mean = vectors.mean(axis=0, keepdims=True)
~/.local/lib/python3.10/site-packages/numpy/core/_methods.py:181: RuntimeWarning: invalid value encountered in true_divide
  ret = um.true_divide(
Traceback (most recent call last):
  File "~/.local/bin/solve-semantle", line 8, in <module>
    sys.exit(main())
  File "~/.local/lib/python3.10/site-packages/semantle/solver.py", line 129, in main
    AssistiveSolver(uncertainty=args.uncertainty).solve()
  File "~/.local/lib/python3.10/site-packages/semantle/solver.py", line 118, in solve
    self.update(info)
  File "~/.local/lib/python3.10/site-packages/semantle/solver.py", line 52, in update
    return self.recommend().recommended
  File "~/.local/lib/python3.10/site-packages/semantle/solver.py", line 40, in recommend
    words = _get_words_closest_to_mean(words, max_words=max_alternatives + 1)
  File "~/.local/lib/python3.10/site-packages/semantle/solver.py", line 82, in _get_words_closest_to_mean
    dist = np.linalg.norm(vectors - mean, axis=1)
  File "<__array_function__ internals>", line 180, in norm
  File "~/.local/lib/python3.10/site-packages/numpy/linalg/linalg.py", line 2547, in norm
    return sqrt(add.reduce(s, axis=axis, keepdims=keepdims))
numpy.AxisError: axis 1 is out of bounds for array of dimension 1

Note: the secret word was "pace".

A brief print()-based debugging session reflects Solver.recommend() calls _get_words_closest_to_mean() with an empty "words" tuple.
This seems to happen only when, at some point in the process, a negative similarity whose absolute value is greater than the uncertainty was submitted.

Cannot seem to get it to work on Windows.

I followed the instructions precisely, but when I type solve-semantle, it says 'solve-semantle' is not recognized as an internal or external command,
operable program or batch file.

What do I do?

Error when running pip install

getting this error:
error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LAR GEFILE64_SOURCE=1 -Inumpy\core\include -Ibuild\src.win-amd64-3.8\numpy\core\include/numpy -Ibuild\src.win-amd64-3.8\numpy\distutils\include -Ibuild\src.win-amd64-3.8\numpy\core\src\umath -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymat h -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\User\StupidProjects\venv\include -IC:\Users\User\AppData\Local\Programs\Python\Python38\include -IC:\Users\User\AppData\Local\Programs\Python\Python38\i nclude -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTo ols\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared -IC:\Program Files (x86)\Window s Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt /Tcbuild\src.win-amd64-3.8\numpy\core\src\umath\_umath_tests.dispatch.avx2.c /Fobuild\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\ umath\_umath_tests.dispatch.avx2.obj /WX /arch:AVX2" failed with exit status 2 INFO:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.