A quantum physics effect to teach, a puzzle to build, a problem to solve, a tool to learn!
Polarizing filters are plastic films that let light shine through only in a particular direction (angle). Combining two at 90 degrees completely blocks light.
Very counterintuitively, inserting a third filter between two filters at 90 degrees allows some light shine through!
This interesting effect can only be explained with quantum physics, as brilliantly explained in this 3Blue1Brown video.
Polarizing filter films are cheap... So I wanted to create a carboard toy to demo this effect in a suprising way to my kids!
A puzzle to build
Idea is to build a puzzle around this weird effect.
I want to build a cardboard octagon with many "windows" (holes), each window covered with one polarizing filter at a certain angle, like this:
Stacking multiple such octagons on top of one another will block light in some combination of filters and not others, depending on the individual filter angles. Moreover, rotating octagons in the stack will make the "displayed pattern" change!
A problem to solve
One a set of "patterns" to display is decided, is it possible to write a program to determine the assignment of filter angles, for each "window" in each octagon, that is able to produce them all?
In principle, yes! In practice, there's an explosion in the number of possible combinations! Eg. 8 angles × 10 windows × 8 slices × 5 octagons × 8⁴ rotation combinations × 5! orderings × 5 upside-down flips is about 8 billion.
...a bit too much for simple for loops! I need a smarter approach.
A tool to learn
Google OR-Tools CP-SAT is a powerful constraint programming solver. It can be used to quickly find solutions to huge combinatorial problems - where one has to find one valid assignment to thousands of variables under thousands of constraints within billions of possible combinations (not all of which valid or optimal)!
Solvers are applicable to many problems and are not new in SUSE's tradition - eg. the zypper package manager uses libsolv to compute valid package dependency combinations, and Uyuni uses Optaplanner to compute valid subscription assignments.
CP-SAT is open source, very efficient (actually close to the state of the art in the field) and easily scriptable from Python... a very interesting target to experiment with!
Now I have an excuse to play with this!
Scope of HackWeek
Find a combination that works for a decent example, and actually cut it in cardboard and filters to try it out!
https://github.com/moio/octaopticon
This project is part of:
Hack Week 23
Activity
Comments
-
about 1 year ago by moio | Reply
Day 1 diary - the physical prototyping day
Spent a bit of time into producing good SVGs with Python, then printed them and tried to find dimensions that worked (one big and one small for testing).
After few iterations decided to go with octagonal stars rather than plain octagons:
Then literally hammered out holes with a 10mm punch! Worked beautifully.
Then, cut and tested positioning of filter film:
All seems good from the physical realm so far.
Next up: coding to determine per-hole filter positioning!
-
about 1 year ago by moio | Reply
Day 2 diary: mostly coding
CP-SAT
Learnt a lot about CP-SAT, evolved some code I had around to handle:
- a variable number of "pizzas" ("stars with filter windows")
- a variable number of "slices" ("sectors" of stars)
- a variable number of "windows" per "slice"
- a variable number of "angles" filters can be glued on
- a variable number of "images"
Difficult part today is the reordering of "pizzas" in the "pizza stack". Giving that ability makes more combinations possible, but indirection has to be dealt with in code.
Testing
The good part about this problem is that tests can trivially be randomized, so it's easy to see if produced solutions work or not.
The bad part is not all randomized problem instances have a solutions. For those who do not, CP-SAT will happily burn CPUs for hours. I added a pretty arbitrary time limit.
ChatGPT
I used ChatGPT for the scaffolding work - and was quite happy with it:
> Set up a new Python 3.9 based project according to current best practices. > > The project must use the ortools library from Google (note that is a wrapper around a C++ library) > > Include support for: linting, dependency management, github codespace, tests, a Dockerfile, github actions on push and PR including and tests and lint, github actions for release of source archive and docker container on ghcr.io > > Also include a scaffolded README and LICENSE (AGPL) > > The project must compile and work cross platform, including Linux x86 and Mac arm. > > Explain every file created step by step and why
Not a perfect result, but a good result to learn from - faster than stitching together 10 blog posts (for someone not daily into an ecosystem).
-
about 1 year ago by moio | Reply
Day 3 diary: 3 failures, 1 success
Failure 1: adding the possibility of re-ordering the stack
I thought that allowing to re-ordering pizzas in the stack could help with storing more "images" - found out that as not the case. On a large set of pseudorandom tests, only an extra 4 out of 186 could be solved by changing the order. Not worth it, commit reverted.
Failure 2: going from a SAT problem to an optimization problem
CP-SAT has the cool ability of allowing to specify an objective function to minimize or maximise - making it simple to reformulate a satisfiability problem in an optimization one. I tried this approach to make the assignments more flexible but failed: I could not find a good way to mix it with the Automaton constraints which I am using to simulate light traveling through a series of filters. Path abandoned for now.
Failure 3: allowing brighter-than-specified pixels
This seemed an easy way to enlarge the solution space - interestingly, almost no effect was visible in tests. Sticking for the simpler approach (to match pixel values exactly) for now.
Success! First small four-pizza prototype works!
I am happy to report that after some serious hammering and cutting...
...and serious gluing of filter films...
...I've got a nice filter set! Notice how filtering of monitor light (which is polarized) changes with rotation!
Now I made four pizzas...
And, in the right order, they will display a programmed X pattern!
I was able to "store" 7 patterns in the four pizzas (a "Y", a "q", the "X" above, an "o", an "I", a "c" and a "K").
Next step: the bigger brother pizza with bigger patterns!
-
about 1 year ago by moio | Reply
Day 4 diary: scale up!
Today I dealt with the bigger version of the puzzle. Software scaled just fine!
About hardware I was lucky enough to get help from my son across all phases!
I am really happy with the result, here they are in all their whiteness:
What message did we hid in there? Stay tuned tomorrow for the last demo!
PS. Thanks to colleague AR about having kids do some of the job - that worked great!
-
about 1 year ago by moio | Reply
Day 5 diary: it's a wrap!
Today I created a video to explain progress and results, enjoy!
Tricky part was to get light right - so that it was clearly visible on video. Ended up with an inverted laptop screen covered with an opaque film - otherwise light comes polarized and all behavior is totally different!
Similar Projects
ClusterOps - Easily install and manage your personal kubernetes cluster by andreabenini
Description
ClusterOps is a Kubernetes installer and operator designed to streamline the initial configuration
and ongoing maintenance of kubernetes clusters. The focus of this project is primarily on personal
or local installations. However, the goal is to expand its use to encompass all installations of
Kubernetes for local development purposes.
It simplifies cluster management by automating tasks and providing just one user-friendly YAML-based
configuration config.yml
.
Overview
- Simplified Configuration: Define your desired cluster state in a simple YAML file, and ClusterOps will handle the rest.
- Automated Setup: Automates initial cluster configuration, including network settings, storage provisioning, special requirements (for example GPUs) and essential components installation.
- Ongoing Maintenance: Performs routine maintenance tasks such as upgrades, security updates, and resource monitoring.
- Extensibility: Easily extend functionality with custom plugins and configurations.
- Self-Healing: Detects and recovers from common cluster issues, ensuring stability, idempotence and reliability. Same operation can be performed multiple times without changing the result.
- Discreet: It works only on what it knows, if you are manually configuring parts of your kubernetes and this configuration does not interfere with it you can happily continue to work on several parts and use this tool only for what is needed.
Features
- distribution and engine independence. Install your favorite kubernetes engine with your package
manager, execute one script and you'll have a complete working environment at your disposal.
- Basic config approach. One single
config.yml
file with configuration requirements (add/remove features): human readable, plain and simple. All fancy configs managed automatically (ingress, balancers, services, proxy, ...). - Local Builtin ContainerHub. The default installation provides a fully configured ContainerHub available locally along with the kubernetes installation. This configuration allows the user to build, upload and deploy custom container images as they were provided from external sources. Internet public sources are still available but local development can be kept in this localhost server. Builtin ClusterOps operator will be fetched from this ContainerHub registry too.
- Kubernetes official dashboard installed as a plugin, others planned too (k9s for example).
- Kubevirt plugin installed and properly configured. Unleash the power of classic virtualization (KVM+QEMU) on top of Kubernetes and manage your entire system from there, libvirtd and virsh libs are required.
- One operator to rule them all. The installation script configures your machine automatically during installation and adds one kubernetes operator to manage your local cluster. From there the operator takes care of the cluster on your behalf.
- Clean installation and removal. Just test it, when you are done just use the same program to uninstall everything without leaving configs (or pods) behind.
Planned features (Wishlist / TODOs)
- Containerized Data Importer (CDI). Persistent storage management add-on for Kubernetes to provide a declarative way of building and importing Virtual Machine Disks on PVCs for
Make more sense of openQA test results using AI by livdywan
Description
AI has the potential to help with something many of us spend a lot of time doing which is making sense of openQA logs when a job fails.
User Story
Allison Average has a puzzled look on their face while staring at log files that seem to make little sense. Is this a known issue, something completely new or maybe related to infrastructure changes?
Goals
- Leverage a chat interface to help Allison
- Create a model from scratch based on data from openQA
- Proof of concept for automated analysis of openQA test results
Bonus
- Use AI to suggest solutions to merge conflicts
- This would need a merge conflict editor that can suggest solving the conflict
- Use image recognition for needles
Resources
Timeline
Day 1
- Conversing with open-webui to teach me how to create a model based on openQA test results
- Asking for example code using TensorFlow in Python
- Discussing log files to explore what to analyze
- Drafting a new project called Testimony (based on Implementing a containerized Python action) - the project name was also suggested by the assistant
Day 2
- Using NotebookLLM (Gemini) to produce conversational versions of blog posts
- Researching the possibility of creating a project logo with AI
- Asking open-webui, persons with prior experience and conducting a web search for advice
Highlights
- I briefly tested compared models to see if they would make me more productive. Between llama, gemma and mistral there was no amazing difference in the results for my case.
- Convincing the chat interface to produce code specific to my use case required very explicit instructions.
- Asking for advice on how to use open-webui itself better was frustratingly unfruitful both in trivial and more advanced regards.
- Documentation on source materials used by LLM's and tools for this purpose seems virtually non-existent - specifically if a logo can be generated based on particular licenses
Outcomes
Saline (state deployment control and monitoring tool for SUSE Manager/Uyuni) by vizhestkov
Project Description
Saline is an addition for salt used in SUSE Manager/Uyuni aimed to provide better control and visibility for states deploymend in the large scale environments.
In current state the published version can be used only as a Prometheus exporter and missing some of the key features implemented in PoC (not published). Now it can provide metrics related to salt events and state apply process on the minions. But there is no control on this process implemented yet.
Continue with implementation of the missing features and improve the existing implementation:
authentication (need to decide how it should be/or not related to salt auth)
web service providing the control of states deployment
Goal for this Hackweek
Implement missing key features
Implement the tool for state deployment control with CLI
Resources
https://github.com/openSUSE/saline
Ansible for add-on management by lmanfredi
Description
Machines can contains various combinations of add-ons and are often modified during the time.
The list of repos can change so I would like to create an automation able to reset the status to a given state, based on metadata available for these machines
Goals
Create an Ansible automation able to take care of add-on (repo list) configuration using metadata as reference
Resources
- Machines
- Repositories
- Developing modules
- Basic VM Guest management
- Module
zypper_repository_list
- ansible-collections community.general
Results
Created WIP project Ansible-add-on-openSUSE
Run local LLMs with Ollama and explore possible integrations with Uyuni by PSuarezHernandez
Description
Using Ollama you can easily run different LLM models in your local computer. This project is about exploring Ollama, testing different LLMs and try to fine tune them. Also, explore potential ways of integration with Uyuni.
Goals
- Explore Ollama
- Test different models
- Fine tuning
- Explore possible integration in Uyuni
Resources
- https://ollama.com/
- https://huggingface.co/
- https://apeatling.com/articles/part-2-building-your-training-data-for-fine-tuning/
Symbol Relations by hli
Description
There are tools to build function call graphs based on parsing source code, for example, cscope
.
This project aims to achieve a similar goal by directly parsing the disasembly (i.e. objdump) of a compiled binary. The assembly code is what the CPU sees, therefore more "direct". This may be useful in certain scenarios, such as gdb/crash debugging.
Detailed description and Demos can be found in the README file:
Supports x86 for now (because my customers only use x86 machines), but support for other architectures can be added easily.
Tested with python3.6
Goals
Any comments are welcome.
Resources
https://github.com/lhb-cafe/SymbolRelations
symrellib.py: mplements the symbol relation graph and the disassembly parser
symrel_tracer*.py: implements tracing (-t option)
symrel.py: "cli parser"
Make more sense of openQA test results using AI by livdywan
Description
AI has the potential to help with something many of us spend a lot of time doing which is making sense of openQA logs when a job fails.
User Story
Allison Average has a puzzled look on their face while staring at log files that seem to make little sense. Is this a known issue, something completely new or maybe related to infrastructure changes?
Goals
- Leverage a chat interface to help Allison
- Create a model from scratch based on data from openQA
- Proof of concept for automated analysis of openQA test results
Bonus
- Use AI to suggest solutions to merge conflicts
- This would need a merge conflict editor that can suggest solving the conflict
- Use image recognition for needles
Resources
Timeline
Day 1
- Conversing with open-webui to teach me how to create a model based on openQA test results
- Asking for example code using TensorFlow in Python
- Discussing log files to explore what to analyze
- Drafting a new project called Testimony (based on Implementing a containerized Python action) - the project name was also suggested by the assistant
Day 2
- Using NotebookLLM (Gemini) to produce conversational versions of blog posts
- Researching the possibility of creating a project logo with AI
- Asking open-webui, persons with prior experience and conducting a web search for advice
Highlights
- I briefly tested compared models to see if they would make me more productive. Between llama, gemma and mistral there was no amazing difference in the results for my case.
- Convincing the chat interface to produce code specific to my use case required very explicit instructions.
- Asking for advice on how to use open-webui itself better was frustratingly unfruitful both in trivial and more advanced regards.
- Documentation on source materials used by LLM's and tools for this purpose seems virtually non-existent - specifically if a logo can be generated based on particular licenses
Outcomes
Learn how to integrate Elixir and Phoenix Liveview with LLMs by ninopaparo
Description
Learn how to integrate Elixir and Phoenix Liveview with LLMs by building an application that can provide answers to user queries based on a corpus of custom-trained data.
Goals
Develop an Elixir application via the Phoenix framework that:
- Employs Retrieval Augmented Generation (RAG) techniques
- Supports the integration and utilization of various Large Language Models (LLMs).
- Is designed with extensibility and adaptability in mind to accommodate future enhancements and modifications.
Resources
- https://elixir-lang.org/
- https://www.phoenixframework.org/
- https://github.com/elixir-nx/bumblebee
- https://ollama.com/
ghostwrAIter - a local AI assisted tool for helping with support cases by paolodepa
Description
This project is meant to fight the loneliness of the support team members, providing them an AI assistant (hopefully) capable of scraping supportconfigs in a RAG fashion, trying to answer specific questions.
Goals
- Setup an Ollama backend, spinning one (or more??) code-focused LLMs selected by license, performance and quality of the results between:
- deepseek-coder-v2
- dolphin-mistral
- starcoder2
- (...others??)
- Setup a Web UI for it, choosing an easily extensible and customizable option between:
- Extend the solution in order to be able to:
- Add ZIU/Concord shared folders to its RAG context
- Add BZ cases, splitted in comments to its RAG context
- A plus would be to login using the IDP portal to ghostwrAIter itself and use the same credentials to query BZ
- Add specific packages picking them from IBS repos
- A plus would be to login using the IDP portal to ghostwrAIter itself and use the same credentials to query IBS
- A plus would be to desume the packages of interest and the right channel and version to be picked from the added BZ cases
Research how LLMs could help to Linux developers and/or users by anicka
Description
Large language models like ChatGPT have demonstrated remarkable capabilities across a variety of applications. However, their potential for enhancing the Linux development and user ecosystem remains largely unexplored. This project seeks to bridge that gap by researching practical applications of LLMs to improve workflows in areas such as backporting, packaging, log analysis, system migration, and more. By identifying patterns that LLMs can leverage, we aim to uncover new efficiencies and automation strategies that can benefit developers, maintainers, and end users alike.
Goals
- Evaluate Existing LLM Capabilities: Research and document the current state of LLM usage in open-source and Linux development projects, noting successes and limitations.
- Prototype Tools and Scripts: Develop proof-of-concept scripts or tools that leverage LLMs to perform specific tasks like automated log analysis, assisting with backporting patches, or generating packaging metadata.
- Assess Performance and Reliability: Test the tools' effectiveness on real-world Linux data and analyze their accuracy, speed, and reliability.
- Identify Best Use Cases: Pinpoint which tasks are most suitable for LLM support, distinguishing between high-impact and impractical applications.
- Document Findings and Recommendations: Summarize results with clear documentation and suggest next steps for potential integration or further development.
Resources
- Local LLM Implementations: Access to locally hosted LLMs such as LLaMA, GPT-J, or similar open-source models that can be run and fine-tuned on local hardware.
- Computing Resources: Workstations or servers capable of running LLMs locally, equipped with sufficient GPU power for training and inference.
- Sample Data: Logs, source code, patches, and packaging data from openSUSE or SUSE repositories for model training and testing.
- Public LLMs for Benchmarking: Access to APIs from platforms like OpenAI or Hugging Face for comparative testing and performance assessment.
- Existing NLP Tools: Libraries such as spaCy, Hugging Face Transformers, and PyTorch for building and interacting with local LLMs.
- Technical Documentation: Tutorials and resources focused on setting up and optimizing local LLMs for tasks relevant to Linux development.
- Collaboration: Engagement with community experts and teams experienced in AI and Linux for feedback and joint exploration.
AI for product management by a_jaeger
Description
Learn about AI and how it can help myself
What are the jobs that a PM does where AI can help - and how?
Goals
- Investigate how AI can help with different tasks
- Check out different AI tools, which one is best for which job
- Summarize learning
Resources
- Reading some blog posts by PMs that looked into it
- Popular and less popular AI tools
SUSE Prague claw machine by anstalker
Project Description
The idea is to build a claw machine similar to e.g. this one:
Why? Well, it could be a lot of fun!
But also it's a great way to dispense SUSE and openSUSE merch like little Geekos at events like conferences, career fairs and open house events.
Goal for this Hackweek
Build an arcade claw machine.
Resources
In French, an article about why you always lose in claw machine games:
We're looking for handy/crafty people in the Prague office:
- woodworking XP or equipment
- arduino/raspi embedded programming knowledge
- Anthony can find a budget for going to GM and buying servos and such ;)
Port some classic game to Linux by MDoucha
Let's pick some old classic game, reverse engineer the data formats and game rules and write an open source engine for it from scratch. Some games from 1990s are simple enough that we could have a playable prototype by the end of the week.
Write which games you'd like to hack on in the comments. Don't forget to check e.g. on Open Source Game Clones, Github and SourceForge whether the game is ported already.
Hack Week 24 - Master of Orion II: Battle at Antares & Chaos Overlords
Work on Master of Orion II continues but we can hack more than one game. Chaos Overlords is a dystopian, lighthearted, cyberpunk turn-based strategy game originally released in 1996 for Windows 95 and Mac OS. The player takes on the role of a Chaos Overlord, attempting to control a city. Gameplay involves hiring mercenary gangs and deploying them on an 8-by-8 grid of city sectors to generate income, occupy sectors and take over the city.
How to ~~install & play~~ observe the decompilation progress:
- Clone the Git repository
- A playable reimplementation does not exist yet, but when it does, it will be linked in the repository mentioned above.
Further work needed:
- Analyze the remaining unknown data structures, most of which are related to the AI.
- Decompile the AI completely. The strong AI is part of the appeal of the game. It cannot be left out.
- Reimplement the game.
Hack Week 20, 21, 22 & 23 - Master of Orion II: Battle at Antares
Master of Orion II is one of the greatest turn-based 4X games of the 1990s. Explore the galaxy, colonize planets, research new technologies, fight space monsters and alien empires and in the end, become the ruler of the galaxy one way or another.
How to install & play:
- Clone the Git repository
- Run
./bootstrap; ./configure; make && make install
- Copy all *.LBX files from the original Master of Orion II to the installation data directory (
/usr/local/share/openorion2
by default) - Run
openorion2
Further work needed:
- Analyze the rest of the original savegame format and a few remaining data files.
- Implement most of the game. The open source engine currently supports only loading saved games from the original version and viewing the galaxy map, fleet management and list of known planets.
Hack Week 19 - Signus: The Artifact Wars
Signus is a Czech turn-based strategy game similar to Panzer General or Battle Isle series. Originally published in 1998 and open-sourced by the original developers in 2003.
How to install & play:
- Clone the Git repository
- Run
./bootstrap; ./configure; make && make install
in bothsignus
andsignus-data
directories. - Run
signus
Further work needed:
- Create openSUSE package
- Implement full support for original game data (the open source version uses slightly different data file contents but original game data can be converted using a script).
SUSE AI Meets the Game Board by moio
Use tabletopgames.ai’s open source TAG and PyTAG frameworks to apply Statistical Forward Planning and Deep Reinforcement Learning to two board games of our own design. On an all-green, all-open source, all-AWS stack!
AI + Board Games
Board games have long been fertile ground for AI innovation, pushing the boundaries of capabilities such as strategy, adaptability, and real-time decision-making - from Deep Blue's chess mastery to AlphaZero’s domination of Go. Games aren’t just fun: they’re complex, dynamic problems that often mirror real-world challenges, making them interesting from an engineering perspective.
As avid board gamers, aspiring board game designers, and engineers with careers in open source infrastructure, we’re excited to dive into the latest AI techniques first-hand.
Our goal is to develop an all-open-source, all-green AWS-based stack powered by some serious hardware to drive our board game experiments forward!
Project Goals
Set Up the Stack:
- Install and configure the TAG and PyTAG frameworks on SUSE Linux Enterprise Base Container Images.
- Integrate with the SUSE AI stack for GPU-accelerated training on AWS.
- Validate a sample GPU-accelerated PyTAG workload on SUSE AI.
- Ensure the setup is entirely repeatable with Terraform and configuration scripts, documenting results along the way.
Design and Implement AI Agents:
- Develop AI agents for the two board games, incorporating Statistical Forward Planning and Deep Reinforcement Learning techniques.
- Fine-tune model parameters to optimize game-playing performance.
- Document the advantages and limitations of each technique.
Test, Analyze, and Refine:
- Conduct AI vs. AI and AI vs. human matches to evaluate agent strategies and performance.
- Record insights, document learning outcomes, and refine models based on real-world gameplay.
Technical Stack
- Frameworks: TAG and PyTAG for AI agent development
- Platform: SUSE AI
- Tools: AWS for high-performance GPU acceleration
Why This Project Matters
This project not only deepens our understanding of AI techniques by doing but also showcases the power and flexibility of SUSE’s open-source infrastructure for supporting high-level AI projects. By building on an all-open-source stack, we aim to create a pathway for other developers and AI enthusiasts to explore, experiment, and deploy their own innovative projects within the open-source space.
Our Motivation
We believe hands-on experimentation is the best teacher.
Combining our engineering backgrounds with our passion for board games, we’ll explore AI in a way that’s both challenging and creatively rewarding. Our ultimate goal? To hack an AI agent that’s as strategic and adaptable as a real human opponent (if not better!) — and to leverage it to design even better games... for humans to play!
Understand and maybe implement optimal solution finder for Rubik's Cube using IDA* algorithm by aschnell
The Rubik's Cube celebrates its 50th anniversary this year. The goal of this hackweek project is to understand the IDA* (the star is part of the name - not a link to a footnote) algorithm that can be used to find an optimal solution for any (valid) starting condition of a Rubik's cube. The IDA* algorithm also has other applications, e.g. 15-puzzle and pathfinding. I read one paper [1] about it but unfortunately did not understand it well. In any case it is once again graph theory (it is always graph theory if you look at a problem long enough).
Sure there are already implementations of it, e.g.:
https://github.com/Jai0212/Rubiks-Cube-Solver-Using-IDA-Star/
The next hackweek projects are kind of preset already:
Detect cube condition via camera
Build robot to solve real physical Rubik's Cube
[1] https://www.cs.princeton.edu/courses/archive/fall06/cos402/papers/korfrubik.pdf