Playing Mastermind more logically or writing Prolog more efficiently

  • Authors:
  • David M. W. Powers

  • Affiliations:
  • University of New South Wales

  • Venue:
  • ACM SIGART Bulletin
  • Year:
  • 1984

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the last few issues of SIGART there have appeared (#82, 83 & 85) three articles on Mastermind programmes, the latest of which, by Ehud Shapiro [1], presents a PROLOG version of the best known algorithm for the oldest form of the game-Bull-cow. This paper presents some improvements to this programme and uses it as an example in making some general points about PROLOG. Shapiro's programme is simple and demonstrates the power of PROLOG for implementing a quick solution using a well understood algorithm. My comments concern some changes to assist readability, to improve generality, and to develop a different, more efficient derivative of the algorithm.