Giter VIP home page Giter VIP logo

palindromes's Introduction

palindromes/semordnilaps & sator squares

context

Sator Squares are cool elegant word puzzles. They can be read left to right, top to bottom, right to left, and bottom to top. Making them is a fun (& time consuming) challenge. My goal with this project was to find an algorithmic way of finding/constructing SATOR squares where you could select a palindrome and the algorithm would build a Sator square around it.

An ancient Sator Square

an approach

in order to do that, we need to do a series of operations

  1. select the size of the square (n)
  2. search the dictionary to find palindromes and heteropalindromes of length = n; this is the complete set of words that can be used to construct the Sator square.
  3. choose from the list a palidrome to place in the center
T
E
T E N E T
E
T
  1. place heropalidromes that have overlapping letters into adjacent squares, moving outward from the center or inwards from the outside are both possible
R O T A S
E A
T E N E T
E O
T R
R O T A S
O E A
T E N E T
A E O
S A T O R
  1. repeat until the square is complete
R O T A S
O P E R A
T E N E T
A R E P O
S A T O R

algorithm

  1. identify heteropalindromes (& the subset that are true palindromes)
  2. try to fit heteropalindromes around a palindrome

palindromes's People

Contributors

nickmmark avatar

Watchers

 avatar  avatar

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.