Control of a Wave Energy Converter using a multi-agent system and Machine Learning methods