From 40f97f3afd1a897096030faed69f8a9d11d604d8 Mon Sep 17 00:00:00 2001 From: Samuel Moore Date: Sun, 8 Jan 2012 20:10:59 +0800 Subject: [PATCH] Added faq and Copyright notice --- COPYRIGHT | 24 +++++++++++ judge/manager/Makefile | 4 +- judge/manager/graphics.h | 2 +- web/faq.html | 88 ++++++++++++++++++++++++++++++++++++++++ web/index.html | 7 ++-- 5 files changed, 118 insertions(+), 7 deletions(-) create mode 100644 COPYRIGHT create mode 100644 web/faq.html diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..1b61759 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,24 @@ +Copyright (c) 2011-2012, The University Computer Club Inc. (UCC) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the University Computer Club Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/judge/manager/Makefile b/judge/manager/Makefile index 67ffda9..37b2c29 100644 --- a/judge/manager/Makefile +++ b/judge/manager/Makefile @@ -1,9 +1,9 @@ #Makefile for Stratego #Use this to build with graphics -CPP = g++ -Wall -pedantic -lSDL -lGL -lpthread -g +#CPP = g++ -Wall -pedantic -lSDL -lGL -lpthread -g #Use this to build without graphics -#CPP = g++ -Wall -pedantic -lpthread -g +CPP = g++ -Wall -pedantic -lpthread -g OBJ = main.o controller.o ai_controller.o human_controller.o program.o thread_util.o stratego.o graphics.o game.o BIN = stratego diff --git a/judge/manager/graphics.h b/judge/manager/graphics.h index caa57c6..2a96932 100644 --- a/judge/manager/graphics.h +++ b/judge/manager/graphics.h @@ -1,4 +1,4 @@ -#define BUILD_GRAPHICS +//#define BUILD_GRAPHICS #ifdef BUILD_GRAPHICS #ifndef GRAPHICS_H diff --git a/web/faq.html b/web/faq.html new file mode 100644 index 0000000..bc76af2 --- /dev/null +++ b/web/faq.html @@ -0,0 +1,88 @@ + + + Frequently Asked Questions + + + + +

Frequently Asked Questions

+ +

Frequently is a bit misleading, since most of these have only been asked once. Some of them are questions that I predict will be asked.

+ +
    +
  1. +

    Q: How can I test my AI?

    +

    A: The manager program doesn't just play the games and print results. It includes features that let you play against your own AI, or watch it play against others, log games to files and replay them. The best way to test your AI is to play against it. Another good way to test your AI is to have it play against one of the sample AIs.

    +
  2. + +
  3. +

    Q: Where can I get the sample AI programs?

    +

    A: Download the newest versions from the git repository. The sample AI programs should be located in the subdirectory "agents", with one directory for each agent, containing the full source.

    +
  4. + +
  5. +

    Q: Where is the manager program?

    +

    A: The manager program is available in the git repository. It is located in the subdirectory "judge/manager". The executable name is "stratego" (not "manager").

    +
  6. + +
  7. +

    Q: How do I compile the manager program / The manager program will not compile, what do I do?

    +

    A: The manager program is compiled by running "make" in the directory "judge/manager".

    +

    If the manager program fails to compile, it is probably because you do not have the SDL and OpenGL libraries, and are compiling with graphics enabled. You can either obtain SDL and OpenGL developement libraries, or disable graphics and compile the program without them.

    +

    These processes are described in the manual page of the manager program. The manual page can also be found as "web/doc/manager_manual.txt" or "judge/manager/manual.txt" (the latter is a symlink).

    +
  8. +

    Q: What the hell is git, and how do I use it?

    +

    A: git is version control software. Every time any of the programs (including samples) or documentation files for the competition are altered, the changes will be "committed" to git. git allows programmers to revert any changes which break things horribly and go back to their last working version, among other things.

    + +

    As a contestant, all you really need to do is obtain the manager program and sample AI programs from the git repository. This page should give you a list of all the changes to the competition. Next to the most recent, click on the "snapshot" link to download an archive of the most recent version of every file.

    + +

    Of course, if the competition is updated, you will then have an out of date version. It is far better to "clone" the git repository, and periodically run "git pull" to download any changes. Since the purpose of this page is not to be a reference manual for git, learning how to do this is left as an excercise for the reader.

    +
  9. +
  10. +

    Q: Do I have to keep checking the git repository for updates?

    +

    A: No, the mailing list will be emailed every time there is a major change.

    +
  11. + +
  12. +

    Q: I don't know anything about AI programs, where should I start?

    +

    A: The sample AI programs provide a fairly basic strategy; perhaps start by copying a sample AI program and altering it slightly to see if you can improve it.

    + +

    Generally AI programs for board games play by always choosing an optimal move. The sample AI programs adopt this approach by allocating scores to various moves, with the score indicating how "good" the move is. They then sort the moves by score, and choose the move with the highest score.

    +

    Of course, then the problem becomes "What scoring algorithm should I use?", which you will have to find out for yourself.

    + +

    Chess AIs usually look at many future possible board states as a result of each move. In stratego, this approach is less likely to be effective since the strength/abilities of opponent pieces is not known, and must be determined. There is also a time limit to responses by AI programs.

    + + + +
  13. + +
  14. +

    Q: What is in "judge/simulator"?

    +

    A: "judge/simulator/simulate.py" will be used to run the competition. You can use it yourself if you want to run a mock competition between various sample AIs and your own AI.

    +

    The script generates html files containing the results, in the directory "web/results". It also stores log files of every game played in "web/log", which you can replay at your leisure using the manager program.

    + +
  15. +
  16. +

    Q: The language I want to write in does not have any sample AIs, or does not have as advanced sample AIs as other langauges.

    +

    A: Try and rewrite a sample from another AI in your chosen language, or, if you really don't know any other langauges, email matches@ (and be very nice) and ask for him to write a sample in your chosen language.

    + +
  17. + +
  18. +

    Q: I don't know how to program, but am interested in the competition, what should I do?

    +

    A: You will have to learn how to program; the best way to do this is by a combination of the internet and trial and error. Look at the sample AI programs for a reference.

    +
  19. + +
+ +

General tips and Advice

+ +
    +
  1. Print your debug information to stderr to allow your AI to be debugged whilst playing a game
  2. +
+ + +

Return to the main page.

+ + + diff --git a/web/index.html b/web/index.html index 55c1029..a580adc 100644 --- a/web/index.html +++ b/web/index.html @@ -58,7 +58,6 @@

The competition is now officially open. Submissions will be accepted until midday, Saturday the 10th of March, 2012. Results will be announced as soon as they are available (depending on the number of entries it may take several days to simulate the competition).

Clarifications

- -

FAQ

-

If you have a question which is not covered by this page, or about a topic that is vague on this page, please email matches@

- +

Questions?

+

Frequently Asked Questions

+

Please email matches@ or post to #progcomp with any questions not on that page.

Last webpage update: 07/01/12

-- 2.20.1