A reliable musician must be ready to play in any situation. Including jams where the musician was not told the tonality or the chord sequence, not even the tonality. Can you do this?
Try Band in a Box at http://www.pgmusic.com . The program has some amazing features for music students: you can learn to play chords or melody along with a band, you can improve your musical hearing, you can learn guitar chord soloing. But what is relevant for our issue is the "Melodist" feature. You can click on the "Juke Songs Now" button and the program will generate random songs. You should mute the melody and the soloist and improvise along with the computer.
There are two ways to do it: looking at the chords while improvising or turning off the screen and soloing by hearing and intuition. Both ways are not only great teaching tools but also great fun.