Climate and weather extremes such as heat waves, droughts, extreme precipitation events or cold surges have huge social and economic impacts that are expected to increase with climate change. Forecasting of such extreme events on the sub-seasonal time scale (from 10 days to about 3 months) is very challenging because of the poor understanding of phenomena that may increase predictability at this time scale. The Madden-Julian Oscillation (MJO) is the dominant mode of variability in the tropical atmosphere on sub-seasonal time scales and can also promote or enhance phenomena such as monsoons and hurricanes in other regions of the world. Here we develop artificial neural networks that can lead to a very competitive MJO prediction. While our average prediction skill is about 26-27 days (which competes with that obtained with computationally demanding state-of-the-art climate models), for some initial phases the methodology has a prediction skill of 60 days or longer.