lib/realtime: Add Timespec::to_f (and to_s) so one can print them easyly

Signed-off-by: Jean Privat <jean@pryen.org>
lib/ai: introduce the ai library with `backtrack` as the first module

For information, the logic is extracted from the solver of friendz.

Signed-off-by: Jean Privat <jean@pryen.org>
lib/ai: add the eight-queen problem as an example

Signed-off-by: Jean Privat <jean@pryen.org>
friendz: use ai::backtrack instead of the ad-hoc solver

Signed-off-by: Jean Privat <jean@pryen.org>
friendz: add solver_cmd for solve from command line

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: AI backtrack

The first part of the artificial intelligence library.

This provides a framework for a basic backtracking algorithm.

It is used in a standard 8 queens problem (quite elegant!), but also replace the specific solver in friendz (the new solver is a little faster in fact)

Pull-Request: #642
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>