Hakan Kjellerstrand
hakankj.bsky.social
Hakan Kjellerstrand
@hakankj.bsky.social
Swedish software developer (retired), Independent Researcher mostly in in Constraint Programming and Logic Programming, esp. Picat and Prolog. Also interested in probabilistic programming, inductive programming, math, AI.

Homepage: http://hakank.org/
Our second physics paper (preprint) is now available at arXiv: S. V. Chekanov (@svchekanov), H. Kjellerstrand (@hakankj): "Evidence of Relationships Among Fundamental Constants of the Standard Model" (arxiv.org/abs/2509.07713)

Abstract: See next comment.
1/n
Evidence of Relationships Among Fundamental Constants of the Standard Model
This paper presents an approach to reducing the number of fundamental parameters in the Standard Model (SM) using genetic programming, a machine learning technique based on evolutionary algorithms. We...
arxiv.org
September 10, 2025 at 7:17 PM
Here's the GitHub repo of the source code of the #Picat SAT FlatZinc solver fzn_picat_sat used in the MiniZinc Challenge 2025: github.com/hakank/fzn_p... .

For the result of the #MiniZinc Challenge 2025: www.minizinc.org/challenge/20... . (As mentioned earlier, the Picat SAT solver got two Silver.)
GitHub - hakank/fzn_picat_sat
Contribute to hakank/fzn_picat_sat development by creating an account on GitHub.
github.com
August 28, 2025 at 3:58 PM
#Picat version 3.9 has been released: picat-lang.org
Updates: picat-lang.org/updates.txt

It contains improvements of the SAT solver and - which is really cool - a bit vector constraint module which makes it possible to use arbitrary sized domains (> 2**56) in constraint models.

1/3
Picat: Examples of the new bv module in v3.9 · hakank/hakank@ca4a0af
github.com
August 23, 2025 at 8:28 AM
Results from the #MiniZinc Challenge 2025: minizinc.org/challenge/20...
As earlier years, Google OR-tools got all Gold medals. We (#Picat team) got two Silver (again). Choco: 1 Silver, 1, Bronze; Yuck: Silver; SICStus Prolog, Pumpkin, iZplus, and Atlantis: 1 Bronze.

Congrats to all!
MiniZinc is a free and open-source constraint modeling language.
minizinc.org
August 15, 2025 at 6:39 AM
Puzzle creator Jim Bumgardner (aka krazydad, krazydad.com) is "vide coding" a puzzle solver/generator using Constraint Programming (w Google OR-tools): "Lets make minesweeper sudoku part 2" (www.youtube.com/watch?v=aNdT... ).

His other YT videos: www.youtube.com/@jbum
Krazydad Free Puzzles
Free printable and interactive sudoku, mazes, and logic puzzles.
krazydad.com
August 7, 2025 at 8:37 AM
Our paper “Discovering the underlying analytic structure within Standard Model constants using artificial intelligence” by Sergey Chekanov (anl.gov/profile/serg...) and myself (hakank.org) is at arXiv: arxiv.org/abs/2507.00225, in the category hep-ph.
anl.gov
July 2, 2025 at 6:18 AM
Earlier today I read about Warp Terminal (warp.dev) and it looked neat. However, it uses a remote AI for the query.

Since I rather want to use my local LLM (via LM Studio), ChatGPT (4o) and I did Terminal Assistant instead. Examples: hakank.org/terminal_ass...
https://hakank.org/terminal_assistant/terminal_assistant
Some examples of Terminal Assistant =================================== (I'm running LM Studio in API mode with gemma-2-9b-it loaded. This will be auto detected) $ python3 terminal_assistant.py 🧠 ...
hakank.org
March 27, 2025 at 5:46 PM
Here's my (new) Litmus test of LLMs: The No change problem (from medium.com/puzzle-spher... )

#Picat program: www.hakank.org/picat/no_cha... showing two constraint approaches (and a brute force variant).

LLMs might get one of the two solutions, but often only after a lot of corrections.
A Puzzle That Will Test Your Thinking
Pocket Full of Change, But No Change to Give?
medium.com
March 22, 2025 at 7:15 PM
In March 2023, I tested GPT4 with a couple of traditional ILP (Inductive Logic Programming) problems, and some other problems: hakank.org/gpt/

Yesterday, I checked how GPT 4o would do: chatgpt.com/share/67d479...

In summary: quite much better.
ChatGPT - ILP Rule Induction
Shared via ChatGPT
chatgpt.com
March 15, 2025 at 5:23 PM
The other day I happen to read about Einstellung effect (en.wikipedia.org/wiki/Einstel...) and thought that it seems to be one of the problems that are in LLMs.

So I asked GPT 4.5 + Deep Research for a report on LLM Cognitive Biases Research. Here's the report: chatgpt.com/share/67d47b...
Einstellung effect - Wikipedia
en.wikipedia.org
March 15, 2025 at 5:22 PM
#Picat version 3.8 is available: picat-lang.org/download.html

picat-lang.org/download.html
Updates: picat-lang.org/updates.txt
E.g. new if/then/else syntax variant, improved error handling, debug flag (-d) at command line, new between/4, and some other bug fixes.
picat-lang.org
February 1, 2025 at 7:12 PM
This Friday I decided to refresh my old (pre C++11) C++ foo in order to play with Competitive Programming at sites such as CSES (cses.fi/problemset/). Also, to use Visual Studio Code (I'm an avid Emacs user).
But, darn what Copilot autocomplete disturbed the flow...
1/2
CSES - CSES Problem Set - Tasks
cses.fi
January 26, 2025 at 7:06 PM
#Picat version 3.8.b-4 is available: picat-lang.org/download.html

Updates: picat-lang.org/updates.txt (e.g. new if/then/else syntax variant, improved error handling, debug flag (-d) at command line, new between/4, and some other bug fixes).
Picat
picat-lang.org
January 13, 2025 at 6:41 AM
Summary of my #AdventOfCode journey this year: Got 40 stars (last year 37 stars) so I'm quite happy with this.
Actually even more so since some days I really struggled with my "chemo brain" after the cancer chemotherapy that finished earlier this year.
December 25, 2024 at 6:18 PM
#AdventOfCode (adventofcode.com) Day 25

#Picat: hakank.org/advent-of-co...

And thanks for all these wonderful (and - at least for me - sometimes too hard) puzzles!
Advent of Code 2024
adventofcode.com
December 25, 2024 at 7:05 AM
#AdventOfCode Day 24: Here's two different approaches for solving Part 1 in #Picat using CP solver:
- hakank.org/advent-of-co...
- hakank.org/advent-of-co...

part1b.pi was the one I used to get a point since part1.pi contained an annoying bug (fixed via DestyNova's hint).
http://hakank.org/advent-of-code-2024/24_part1.pi
/* Advent of Code 2024 in Picat. Problem 24 https://adventofcode.com/2024/day/24 Part 1 Thanks to DestyNova for hinting on a very annoying bug in part 1. This program was created by ...
hakank.org
December 24, 2024 at 10:01 AM
A wonderful, illuminating - and entertaining - talk by Eric Wastl (creator of #AdventOfCode) on behind the scenes of Advent Of Code: www.youtube.com/watch?v=uZ8D...
Keynote: Advent of Code, Behind the Scenes - Eric Wastl
YouTube video by CppNorth
www.youtube.com
December 23, 2024 at 7:35 PM
I just completed "LAN Party" - Day 23 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/23
Day 23 - Advent of Code 2024
adventofcode.com
December 23, 2024 at 6:05 AM
I've completed "Monkey Market" - Day 22 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/22
Day 22 - Advent of Code 2024
adventofcode.com
December 22, 2024 at 8:55 AM
I just completed "Linen Layout" - Day 19 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/19
Day 19 - Advent of Code 2024
adventofcode.com
December 19, 2024 at 8:39 AM
I just completed "Guard Gallivant" - Day 6 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/6
Day 6 - Advent of Code 2024
adventofcode.com
December 18, 2024 at 9:18 PM
I've completed "RAM Run" - Day 18 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/18
Day 18 - Advent of Code 2024
adventofcode.com
December 18, 2024 at 10:09 AM
I just completed "Restroom Redoubt" - Day 14 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/14
Day 14 - Advent of Code 2024
adventofcode.com
December 14, 2024 at 8:16 AM
I just completed "Claw Contraption" - Day 13 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/13
Day 13 - Advent of Code 2024
adventofcode.com
December 13, 2024 at 5:48 AM
I just completed "Plutonian Pebbles" - Day 11 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/11
Day 11 - Advent of Code 2024
adventofcode.com
December 11, 2024 at 6:59 PM