CayleyPy API Reference

Core classes and functions

cayleypy.CayleyGraphDef

Mathematical definition of a CayleyGraph.

cayleypy.CayleyGraph

Represents a Schreier coset graph for some group.

cayleypy.CayleyPath

Path in a Cayley graph.

cayleypy.BfsResult

Result of running breadth-first search on a Schreier coset graph.

cayleypy.find_path(graph, start_state, **kwargs)

Finds path from start_state to central state.

Graphs library

cayleypy.PermutationGroups

Pre-defined Cayley graphs for permutation groups (S_n).

cayleypy.MatrixGroups

Pre-defined Cayley graphs for matrix groups.

cayleypy.Puzzles

Definitions of graphs describing various puzzles.

cayleypy.GapPuzzles

Library of puzzles defined in GAP format.

cayleypy.create_graph(*[, ...])

Creates CayleyGraph.

cayleypy.prepare_graph(name[, n])

Returns pre-defined CayleyGraphDef by codename and additional kwargs.

Beam search and ML

cayleypy.Predictor

Estimates distance from central state to given states.

cayleypy.algo.BeamSearchAlgorithm

Beam search algorithm for finding paths in Cayley graphs.

cayleypy.algo.BeamSearchResult

Result of running beam search on a Cayley graph.

cayleypy.algo.RandomWalksGenerator

Generator for random walks on Cayley graphs.

cayleypy.models.ModelConfig

Configuration used to describe ML model.

Special algorithms

cayleypy.algo.bfs_bitmask(graph[, max_diameter])

Version of BFS storing all vertices explicitly as bitmasks, using 3 bits of memory per state.

cayleypy.algo.bfs_numpy(graph[, max_diameter])

Simple version of BFS (from destination_state) using numpy, optimized for memory usage.

cayleypy.algo.InteractiveBfs

Interactive breadth-first search that computes layers one by one.

cayleypy.algo.MeetInTheMiddle

Meet-in-the middle (MITM) algorithm for path finding.