Q:

Automated Bulls and Cows Player

This is a code golf challenge to see the shortest implementation of an automated guesser in the pen and paper game bulls and cows. 
The game works as follows:
A (usually 4 digit) secret code with only distinct integers 0-9 is picked by one player. A second player guesses codes that each receive a rank. This rank contains 1 bull for every digit that is correctly placed in the guess, and 1 cow for every digit in the guess that is in the secret code, but not in the correct location within the code.
The code should assume a format as follows:

The combination will be a 4 digit number containing only distinct digits 0-9. (eg. 0123 is valid, 0112 is not)
After each guess, you will be given a string as a response telling you how many bulls and how many cows are in your answer.  It will be formatted as xByC, in which x is the number of bulls and y is the number of cows. (i.e. 4B0C means you have won). You can assume that a made-up method called "rateGuess", which takes your guess as a string will provide the response.

A:

Pyth - 11 bytes
This will eventually guess the correct answer. On average 2500 tries. Literally just takes random guesses no matter what the input is. Since you can't define rateGuess in pyth just takes (uneeded) input from stdin and outputs to stdout.
Ofql{T4^UT4

O         Pick random
 f        filter
  ql{T4   set length is four (checks for duplicates)
  ^  4    Caretesian product with 4 repeats
   UT     Unary range till 10

