Learning User Preferences in Fluxbox

Mark Tiefenbruck

Summary

The focus of this project was to implement AI algorithms to learn user preferences automatically in the fluxbox window manager.

Introduction

Fluxbox is a popular window manager for the X window system. Among other things, it is responsible for the arrangement of windows on the desktop. The window manager is notified when a program tries to open a window, and it then decides where the window will be placed. Similarly, when a user moves or resizes a window, he is interacting with the window manager, which in turn moves or resizes the window for him.

There are many strategies for deciding the best size and location for a new window, most of which center around minimizing overlap between windows. However, there are many other factors that may influence which location is the best. For example, the user may have icons on his desktop, which he would like to access without having to move windows. He may also like specific programs to have a particular size or location on the screen. The goal of this project was to learn these factors and their relative importance just by observing the user's behavior.

My solution is to generate a list of potential placements every time a window is opened, then use learned preferences to evaluate each placement. The best one is chosen. Preferences are learned every time the user moves or resizes a window.

PAGE Description

Percepts
Fluxbox can detect all of a window's properties, including application name, window title, program specified size, position, window type, window role, virtual desktop, and window states such as maximized, minimized, and so forth. It's worth noting that Fluxbox does not know the contents of the window, such as text contained within it, and it does not know the process ID, command line arguments, or environment variables of the program that opened the window. Fluxbox also detects when the user tries to move, resize, or otherwise change the state of the window.
Actions
Fluxbox can, at any time, set the exact size and location in pixels for any open window.
Goals
Fluxbox's goal is to learn how the user likes his windows arranged and attempt to place new windows where the user would want them.
Environment
Fluxbox's environment is discrete. It has perfect knowledge of its world, except for time, which it can measure on the order of nanoseconds, with whatever precision its host computer has. Fluxbox has total control over its environment. Its decisions can be carried out exactly, with no possible interference from external sources. Windows can never be moved or resized without the window manager's approval.