Frequently Asked Questions
Your bot needs to implement this function: int makeMove(const char board[][26], int n, char turn, int *row, int *col). The function receives the current board state, board size, and whose turn it is. You need to set *row and *col to your chosen move position. Return any integer value.
The board is a 2D char array where 'B' represents black pieces, 'W' represents white pieces, and 'U' represents unoccupied spaces. The array is indexed from [0][0] (top-left) to [n-1][n-1] (bottom-right).
No, you don't need to. lab8part2.c can be directly ran by ReverC (as two header files lab8part2.h and liblab8part2.h can be recognized), unless you have included some forbidden libraries or keywords, or simply have code errors.
Your makeMove() function has 3 seconds to return a valid move. If your code exceeds this time limit, the game will end and your opponent wins. **Important for APS105 students: 3s is the limit for ReverC server, you need to ensure your code run within 1s to meet the lab8 requirements.
The time measured by ReverC does not guarantee to be as accurate as your own PC or UofT test cases, since ReverC server may facing frequent requests, causing CPU threads to be busy. It is recommended that APS105 students to be subject to the test results of the school machine.
Temporary Code is uploaded for a single session and deleted after the game or when you leave the page. Stored Code is saved and can be reused across multiple games, but it will be automatically deleted after 36 hours.
To ensure fair usage: you can upload code up to 50 times per day, start up to 200 games per day, and use AI opponents up to 10 times per day. These limits reset at midnight.
Each uploaded C file must be under 500KB and no more than 5000 lines of code. These limits are enforced on both the frontend and backend to ensure server stability.
Common reasons include: missing semicolons, undefined functions, incorrect function signature, or using libraries not available on the server. Make sure your code compiles locally with gcc before uploading.
rvc.h is a helper library provided by ReverC (not the APS105 teaching team). It provides four ready-made functions: rvc_in_bounds() to check if a position is within bounds, rvc_occupied() to check if a position is occupied, rvc_position_legal_direction() to check legality in one direction, and rvc_position_legal() to check if a move is legal. These help you quickly test your code pipeline if you haven't finish basic functions, though they may not be the most runtime-efficient.
For security reasons, the following are not allowed in your code: #include <unistd.h>, #include <sys/...>, #include <signal.h>, system(), exec(), fork(), kill(), exit(), __asm__, and asm(). These prevent system calls, process operations, and assembly code that could harm the server.
You can contact the developer via email at icedeverjoe@outlook.com, or open an issue on the GitHub repository at github.com/joewang0430/rever-c. ReverC is still a work in progress, so you might run into some bugs. Thanks for your patience!