# Android Pattern Lock Recovery Assistant > A professional web application designed to help users reconstruct forgotten Android pattern locks using forensic memory techniques rather than brute-forcing. It utilizes human heuristics, partial muscle memory clues, and shape similarity. ## Core Features 1. **Memory-Based Filtering**: Search through the 389,112 possible Android combinations by applying constraints like pattern length, starting nodes, ending nodes, and excluded nodes. 2. **Human Heuristics**: Our engine filters out highly complex, machine-generated squiggles. Real humans generally avoid more than one intersection, prefer starting at corners or edges, and avoid complex direction changes. 3. **Shape Similarity Engine (Levenshtein)**: You can provide a base sequence (e.g. `[0,1,2,5,8]`) and a tolerance parameter. The engine uses a Levenshtein distance algorithm to find patterns that visually resemble your guess within a defined margin of error. ## AI Programming Interface (API) We have exposed the core pattern generation engine to the global `window` object so that autonomous agents and AI models can programmatically interface with the web app without needing to parse the DOM or click buttons. **Usage:** ```javascript // Accessible in the browser console const results = window.AndroidPatternEngine.generatePatterns({ minLength: 4, maxLength: 9, startNode: 0, likelyHuman: true, similarityBase: [0, 1, 2, 4, 8], similarityTolerance: 2 }); console.log(`Found ${results.length} patterns.`); ``` ### Available Filter Options for `generatePatterns(filters)`: - `minLength` (Number): Minimum dots (4-9). - `maxLength` (Number): Maximum dots (4-9). - `startNode` (Number | null): The 0-indexed starting dot (0-8). - `startType` (String): 'corner', 'edge', 'center', or 'any'. - `endNode` (Number | null): The 0-indexed ending dot (0-8). - `endType` (String): 'corner', 'edge', 'center', or 'any'. - `mustInclude` (Array): Nodes that must be in the pattern. - `mustExclude` (Array): Nodes that must NOT be in the pattern. - `symmetry` (String): 'any', 'horizontal', 'vertical', 'diagonalMain', 'diagonalAnti', 'rotational180'. - `noCrossings` (Boolean): Exclude intersecting paths. - `noDiagonals` (Boolean): Exclude diagonal movements. - `noJumps` (Boolean): Only allow strictly adjacent movements (no knight moves). - `strictAndroid` (Boolean): Validate strict Android rules (e.g., 0 to 2 must pass through 1 if unvisited). - `likelyHuman` (Boolean): Applies human heuristics (corners/edges start, low direction changes). - `similarityBase` (Array): A base array of nodes for similarity testing. - `similarityTolerance` (Number): Allowed Levenshtein distance from `similarityBase`. ## Resources - [Main Application](https://forgotmypattern.com/) - [AI Catalog](/ai-catalog.json) - [XML Sitemap](/sitemap.xml)