|
|
|
@@ -14,7 +14,7 @@ |
|
|
|
- Windows:先查看`.\win\CAPI\cpp\`文件夹下是否有`lib`文件夹,没有则https://cloud.tsinghua.edu.cn/d/6972138f641d4e81a446/ 下载并复制粘贴 |
|
|
|
- Linux:首先自行安装`gRPC`,具体方法可以参考官方教程https://grpc.io/docs/languages/cpp/quickstart/。 |
|
|
|
- 然后在`CAPI\cpp\API\src\AI.cpp`中编写代码 |
|
|
|
- 选手不应当修改`AI.cpp`中原来有的代码,除了`void AI::play(IStudentAPI& api)`和`void AI::play(ITrickerAPI& api)` |
|
|
|
- 选手不应当修改`AI.cpp`中原来有的代码,除了`void AI::play(IStudentAPI& api)`和`void AI::play(ITrickerAPI& api)`,及修改asynchronous的返回值 |
|
|
|
- 每帧执行一次`AI::play(IStudentAPI& api)`或`AI::play(ITrickerAPI& api)`(除非执行该函数超过一帧50ms),获取的信息都是这一帧的开始的状态 |
|
|
|
- 选手可以在`AI.cpp`内`void AI::play`外新增函数和变量 |
|
|
|
- Windows:然后用Visual Studio打开`CAPI\cpp\CAPI.sln`编译,注意使用Debug模式 |
|
|
|
@@ -26,7 +26,7 @@ |
|
|
|
|
|
|
|
- 首先在Python环境下运行`GeneratePythonProto.cmd`,以安装必要的包、并生成对应的grpc python文件 |
|
|
|
- 然后在`CAPI\python\PyAPI\AI.py`中编写代码 |
|
|
|
- 选手不应当修改`AI.py`中原来有的代码,除了`StudentPlay(self, api: IStudentAPI)`和`TrickerPlay(self, api: ITrickerAPI)` |
|
|
|
- 选手不应当修改`AI.py`中原来有的代码,除了`StudentPlay(self, api: IStudentAPI)`和`TrickerPlay(self, api: ITrickerAPI)`,及修改asynchronous的返回值 |
|
|
|
- 每帧执行一次`AI::play(IStudentAPI& api)`或`AI::play(ITrickerAPI& api)`(除非执行该函数超过一帧50ms),获取的信息都是这一帧的开始的状态 |
|
|
|
- 选手可以在`AI.py`内新增函数和变量 |
|
|
|
- Windows:最后通过运行`RunPython.cmd`执行比赛代码 |
|
|
|
|