Skip to main content

Newclid is an open-source, easy-to-use fast solver for plane geometry problems.

Fury - PyPi stable version PePy - Downloads PePy - Downloads per week Python - Tests Codacy - Grade Codacy - Coverage CodeStyle - Ruff

Installation

Using pip

pip install newclid[yuclid]

Building from source

Follow uv installation instructions

git clone https://github.com/Newclid/Newclid.git
cd Newclid
uv sync

If you run into issues to build yuclid, you might need to set an environment variable like CXX=/usr/bin/g++-14, try adding environment variable that are present in .env. If you still have issues, submit an issue.

Quickstart

To simply solve a problem using Newclid, use the command line.

For example with a JGEX problem:

newclid jgex --problem-id orthocenter_consequence_aux --file ./problems_datasets/examples.txt

Or with a ggb problem:

newclid ggb --file ./notebooks/ggb_exports/incenter.ggb --goals "eqangle C B B D B D B A"

See other command line interface options with:

uv run newclid --help
uv run newclid jgex --help
uv run newclid ggb --help

For more complex applications, use the Python interface. Below is a minimal example to build a problem setup from a JGEX string, then solve it:

from newclid import GeometricSolverBuilder, GeometricSolver
import numpy as np

# Set the random generator
rng = np.random.default_rng()

# Build the problem setup from JGEX string
problem_setup = JGEXProblemBuilder(rng=rng).with_problem_from_txt(
  "a b c = triangle a b c; "
  "d = on_tline d b a c, on_tline d c a b; "
  "e = on_line e a c, on_line e b d "
  "? perp a d b c"
).build()

# We now build the solver on the problem
solver: GeometricSolver = GeometricSolverBuilder().build(problem_setup)

# And run the solver
success = solver.run()

if success:
    print("Successfuly solved the problem! Proof:")
    solver.write_proof_steps()
else:
    print("Failed to solve the problem...")

print(f"Run infos {solver.run_infos}")

In the notebooks folder you will find more tutorials. You can also check tests to see some more advanced examples of scripts using the Python interface.

Documentation

See the online documentation for more detailed information about Newclid.

Contributing

  1. Clone the repository

git clone https://github.com/Newclid/Newclid.git
cd Newclid
  1. Install uv

Follow installation instructions

  1. Install as an editable package with dev requirements

uv sync
  1. Install pre-commit and pre-push checks

pre-commit install -t pre-commit -t pre-push
  1. Run tests

pytest tests

About Newclid

Newclid is a successor to AlphaGeometry, introduced in this early 2024 Nature paper: Solving Olympiad Geometry without Human Demonstrations. whose original codebase can be found here.

If you found Newclid useful, please cite us as:

@article{newclid2024sicca,
  author  = {Sicca, Vladmir and Xia, Tianxiang and F\'ed\'erico, Math\"is and Gorinski, Philip John and Frieder, Simon and Jui, Shangling},
  journal = {arXiv preprint},
  title   = {Newclid: A User-Friendly Replacement for AlphaGeometry with Agentic Support},
  year    = {2024}
}

The AlphaGeometry checkpoints and vocabulary are made available under the terms of the Creative Commons Attribution 4.0 International (CC BY 4.0) license. You can find details at: https://creativecommons.org/licenses/by/4.0/legalcode

Metadata

Release files for newclid 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for newclid 3.0.1
File Size Uploaded
newclid-3.0.1.tar.gz 358.5 kB Details

Release files / newclid-3.0.1.tar.gz

Download URL newclid-3.0.1.tar.gz
Size 358.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c555d22afac64071567d9dc1b07e653b001489707f05ef19e063d966646169fc
BLAKE2b-256 checksum
How to use checksums
a7fc5036798e867db4069cd4e06f6f9df89ca633398a97976591e440b866bb66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.1 This release

1 release file

3.0.0

1 release file

2.0.2

2 release files

1.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page