1. A method of selecting an antenna array state for a multi-element reconfigurable transmitter and/or receiver antenna, comprising the steps of: a processor executing a learning algorithm that optimizes a wireless link between at least one reconfigurable transmitter antenna and at least one reconfigurable receiver antenna over time over different antenna array states of said at least one reconfigurable transmitter antenna and said at least one reconfigurable receiver antenna; and the processor setting the antenna array configuration for the transmitter and/or a receiver antenna based at least in part on the antenna array states determined by said learning algorithm to lead to an optimized wireless link between said at least one reconfigurable transmitter antenna and said at least one reconfigurable receiver antenna over time, wherein executing the learning algorithm includes formulating selection of an antenna array state using an online learning framework for learning at least one unknown wireless channel condition of said wireless link and selecting the antenna array state that maximizes the at least one wireless channel condition between said at least one reconfigurable transmitter antenna and said at least one reconfigurable receiver antenna over time.