Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: O(1) garbage

Author: Robert Hyatt

Date: 22:24:35 05/16/01

Go up one level in this thread


On May 16, 2001 at 18:13:22, Dann Corbit wrote:

>On May 16, 2001 at 18:02:10, David Rasmussen wrote:
>[snip]
>>In any case, none of the algorithms we know, operates in constant time,
>>regardless of searchdepth or gametree size.
>
>How about the "resign" algorithm?
>
>Worst chess engine in the world...
>
>#include<stdio.h>
>int main(void)
>{
>puts("I resign.");
>return 0;
>}
>
>[snip]


Better:

int main() {
  char ans;
  printf("Draw?  (y/n):");
  scanf("%c",&ans);
  if (ans == 'y') printf("thanks for the game...\n");
  else printf("resign\n");
}

That won't lose quite as often.  :)



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.