In this paper, we designed a one-bit beamforming codebook for reconfigurable intelligent surfaces (RIS). Each codeword in a codebook is a phase pattern at RIS elements that reflects the signal to a desired angle. Those codewords are computed for a specific reflection angle that maximizes the signal-to-noise ratio (SNR) at the receiver (Rx). Since multiple codewords can maximize the SNR, an algorithm to reduce the size of the codebook is proposed. It ensures that the codebook does not contain repetitive codewords. Then, a deep neural network-based codeword selection procedure is performed using an autoencoder (AE) that minimizes the bit error rate (BER) at the receiver. The proposed method shows promising results compared to existing techniques regarding BER with reduced codebook size.