It trains based off the mistakes it made with the solution you gave OR what it got. Thank you for reading