Anyone doing better than 8 tries?
The optimal way to play Mastermind is to craft guesses so they eliminate as many of the remaining patterns as possible: on your turn you can go through every possible guess, tabulate the responses that guess would get for every possible target pattern that remains, and pick a guess where the options are spread evenly across several responses and not just clustered into one, so that no matter what response you get it eliminates a large number of other possibilities. With a good starting guess, you can beat the game on average in only 4–5 guesses.
Galaxybrain is an adversarial Mastermind that tries to extend the game as long as possible by not actually picking a pattern at the start, but instead keeping track of all patterns you haven't eliminated through your guesses and giving you whatever answer will eliminate the least number of those possibilities. It can't increase the worst-case performance of a given strategy, but it'll ensure you never get lucky and guess the correct answer early by making you tediously eliminate every other possibility every time.
Will you actually notice a difference with vanilla Mastermind when you play this? I dunno! This is just a random idea I had that was inspired by jan Misali's video "hangman is a weird game" and I wanted to see what would happen.
I made everything here except the background image, which is a Transparent Textures modification of a Toptal Subtle Patterns texture by Atle Mo. The source code is on Bitbucket, if you dare (I would personally recommend not daring): https://bitbucket.org/CHz16/galaxybrain