All Projects → maebert → prolog_puzzles

maebert / prolog_puzzles

Licence: other
Prolog puzzles for fun and profit (mostly fun)

Programming Languages

perl
6916 projects
prolog
421 projects
matlab
3953 projects

Projects that are alternatives of or similar to prolog puzzles

Python3 Basics Tutorial
Exercises for introductory Python 3 courses
Stars: ✭ 26 (-33.33%)
Mutual labels:  exercise
Voice2Mesh
CVPR 2022: Cross-Modal Perceptionist: Can Face Geometry be Gleaned from Voices?
Stars: ✭ 67 (+71.79%)
Mutual labels:  cognitive-science
reactnative-typescript
Playground and evolution of learnings done in react native with typescript
Stars: ✭ 28 (-28.21%)
Mutual labels:  exercise
FatMaxxer
Android Project to find FatMax in real time with a Polar H10
Stars: ✭ 32 (-17.95%)
Mutual labels:  exercise
traindown-dart
Dart (and Flutter) library for the Traindown Markup Language. This is the reference implementation for now. It is first to receive features and fixes.
Stars: ✭ 16 (-58.97%)
Mutual labels:  exercise
vue-crossword
Crossword puzzle builder VueJS application.
Stars: ✭ 54 (+38.46%)
Mutual labels:  puzzle
numberlink
Program for generating and solving numberlink / flow free puzzles
Stars: ✭ 47 (+20.51%)
Mutual labels:  puzzle
fx-trading-app
Forex Trading Application workshop
Stars: ✭ 23 (-41.03%)
Mutual labels:  exercise
pynpuzzle
Solve, test and benchmark algorithms for N-Puzzle problem with Python
Stars: ✭ 26 (-33.33%)
Mutual labels:  puzzle
BitCrack2
Brute force Bitcoin private keys.
Stars: ✭ 30 (-23.08%)
Mutual labels:  puzzle
LixD
Lix: Lemmings-like game with puzzles, editor, multiplayer
Stars: ✭ 80 (+105.13%)
Mutual labels:  puzzle
refactoring-golf
A Refactoring Golf exercise
Stars: ✭ 40 (+2.56%)
Mutual labels:  exercise
TUMGAD
Exercise generator and helpful materials for the Introduction to Algorithms and Data Structures 📚
Stars: ✭ 27 (-30.77%)
Mutual labels:  exercise
AWKTC
AWKTC is Workable Klutzy Time-wasting Command
Stars: ✭ 44 (+12.82%)
Mutual labels:  puzzle
advent-of-code
Solutions to the Advent of Code editions, mainly using Kotlin.
Stars: ✭ 14 (-64.1%)
Mutual labels:  puzzle
Raymarch-Engine
Minimal ray-traced game engine with gravity affected rays
Stars: ✭ 17 (-56.41%)
Mutual labels:  puzzle
infinity
Infinity is a simple online puzzle hunt/jeopardy-style CTF platform.
Stars: ✭ 11 (-71.79%)
Mutual labels:  puzzle
meandmyshadow
Fork of the puzzle game Me and My Shadow originally at SourceForge
Stars: ✭ 18 (-53.85%)
Mutual labels:  puzzle
deep-active-inference-mc
Deep active inference agents using Monte-Carlo methods
Stars: ✭ 41 (+5.13%)
Mutual labels:  cognitive-science
mimstris
A falling block puzzle game created using React and Redux.
Stars: ✭ 129 (+230.77%)
Mutual labels:  puzzle

Prolog puzzles for fun and profit (mostly fun)

These are exercises I created back in 2007 while TAing "Introduction to Artificial Intelligence and Logic Programming" at the Institute of Cognitive Science in Osnabrück, Germany. I know that a lot of people still personally hate me for this.

Lisp

If you never hacked in Prolog before, learn it! It's fun and it makes you a Better Person™.

If you are a current CogSci student and some of these exercises are still in use:

Well, lucky you. Here is what you should do if you're awesome and want to live up to the excellent reputation you and your fellow students hold in the academic world:

  1. Star this repository. It's the Github way if saying "Thank you for ruining dozens of hours of my life that I will never get back!"
  2. Do your homework yourself and submit your own solution. Plagiarism is not cool.
  3. After you're done, fork this repo, add your own improvements you the solutions and send me a pull request.

I can't have enough of this!

Check P-99: Ninety-Nine Prolog Problems. If you have fun Prolog puzzles of your own, let me know and I'm happy to include them here!

Overwiev:

The Three Musketeers

In one particular chapter of Dumas' novel three events happened simultaneously on spring evening in 1643:

  • Someone was cleaning his musket, another one met Constance Bonacieux and yet another one had a duel with Cardinal Richelieu. One of these events happened in the Hotel Treville, one in the Jardin du Luxembourg and one in Geroge Villier's estate.
  • If either Aramis or Athos was in the Jardin, then someone cleaned his musket in the hotel.
  • Neither was Pathos involved in a duel nor did the duel take place in the Jardin.
  • Aramis lost his musket some days ago, and he was certainly not in the hotel.
  • If Pathos cleaned his musket then Constance has not been to the Jardin.
  • Cardinal Richelieu has been seen in Villier's estate if and only if Pathos was in Villier's estate.
  • Women are not allowed in Treville's Hotel.

Implement a predicate who_did_what(Aramis, Athos, Pathos) that will instantiate each Person with a list containg his action and the place he happened to be at (e.g. Athos = [duel, jardin] etc.) according to the information given above.

Sudoku++

sudoku++

Write a prolog program that solves the following constraint satisfaction problem: write the words "one", "two", "three", "four", "five" and "six" into the boxes such that every word occurs only once per row, column and 2x3 grid. The number of letters of the words in the grids within a dotted box must be equal.

Lost in Translation

Nqblubh Mhboa. Nqrrroah Ukahama Nqblubh. Nqlhalha Ukahama Nqflua.

The Worm

So there you are. Your academic career as a cognitive scientist took a wrong turn somewhere, and now you wrote a virus with the ultimate goal of infecting the desktop computer of your arch rival, Jill Yates.

However, security is rather tight these days, and most machines use firewalls, traces and other measures to keep out people like you. Fortunately you were able to acquire a reduced topology of the internet. Your task is to implement a feasible heuristic for the route through the internet from your own machine, asimov, to your rivals box, jillyates, gaining access to higher security systems with every new infection.

The Matching Problem

Prolog programming can be so romantic! In this exercise you will help five men and women to find their one and true loves - well, maybe.

In our case, we've got five males and five females. All of them assigned ranks to all members of the opposite sex and should get married according to those ranks. Now someone is said to be living in a stable marriage if there is no member of the opposite sex such that both would rather have each other than their current partners (and the same condition holds for that someone's partner).

  • Excercise: matching.pro
  • Solution: Left as an exercise to the reader.

Chocolate

Ah, chocolate. The delicious blast of theobromine, caffeine, phenylethylamine and anandamide that will set off an uncanny firework in your brain has been used as treat, medicine and arguably aphrodisiac for more than three millennia since its first cultivation by Olmec and Maya cultures. My personal favourite is dark chocolate made from Caribbean Criollo beans with a hint of orange.

Yummie chocolate

Anyway, here is your task: suppose you have a bar of your favourite chocolate which counts 5 x 9 pieces (so 45 in total) and want to share it with your three best friends (stupid enough). Now being a cognitive scientist you want to split the bar optimally with only three straight breaks between the square parts. And being more best friends with some than with others you want to give each of your friends a different amount of chocolate.

  • Excercise: chocolate.pro
  • Solution: Left as an exercise to the reader.

The Kidnapped Robot

You've just built a mobile robot, equipped it with four ultrasonic range finders to measure the distance to obstacles in the four principal directions and programmed it with a map of its environment. Now someone with questionable morale standards kidnapped your little robot and released it somewhere else on the map. Your robot wants to drive home, but to plan a route it must first localise itself on the map.

  • Excercise: robot.pro
  • Solution: Left as an exercise to the reader.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].