  We present a general framework for understanding system intelligence, i.e.,
the level of system smartness perceived by users, and propose a novel metric
for measuring intelligence levels of dynamical human-in-the-loop systems,
defined to be the maximum average reward obtained by proactively serving user
demands, subject to a resource constraint. Our metric captures two important
elements of smartness, i.e., being able to know what users want and pre-serve
them, and achieving good resource management while doing so. We provide an
explicit characterization of the system intelligence, and show that it is
jointly determined by user demand volume (opportunity to impress), demand
correlation (user predictability), and system resource and action costs
(flexibility to pre-serve).
  We then propose an online learning-aided control algorithm called
Learning-aided Budget-limited Intelligent System Control (\mtt{LBISC}). We show
that \lbisc{} achieves an intelligence level that is within
$O(N(T)^{-\frac{1}{2}}+\epsilon)$ of the highest level, where $N(T)$ represents
the number of data samples collected within a learning period $T$ and is
proportional to the user population size in the system, while guaranteeing an
$O(\max( N(T)^{-\frac{1}{2}}/\epsilon, \log(1/\epsilon)^2))$ average resource
deficit. Moreover, we show that \lbisc{} possesses an $O(\max(
N(T)^{-\frac{1}{2}}/\epsilon$, $ \log(1/\epsilon)^2)+T)$ convergence time,
which is much smaller compared to the $\Theta(1/\epsilon)$ time required for
non-learning based algorithms. The analysis of \lbisc{} rigorously quantifies
the impacts of data and user population (captured by $N(T)$), learning
(captured by our learning method), and control (captured by \lbisc) on
achievable system intelligence, and provides novel insight and guideline into
designing future smart systems.
