Giter Site home page Giter Site logo

rlglab / minizero Goto Github PK

View Code? Open in Web Editor NEW
62.0 5.0 16.0 2.27 MB

MiniZero: An AlphaZero and MuZero Training Framework

Python 30.63% Shell 7.23% CMake 0.42% C++ 61.72%
alphazero deep-reinforcement-learning gumbel-alphazero gumbel-muzero mcts muzero monte-carlo-tree-search atari board-games go

minizero's Introduction

MiniZero

MiniZero is a zero-knowledge learning framework that supports AlphaZero, MuZero, Gumbel AlphaZero, and Gumbel MuZero algorithms.

This is the official repository of the IEEE ToG paper MiniZero: Comparative Analysis of AlphaZero and MuZero on Go, Othello, and Atari Games.

If you use MiniZero for research, please consider citing our paper as follows:

@article{wu2024minizero,
  title={MiniZero: Comparative Analysis of AlphaZero and MuZero on Go, Othello, and Atari Games},
  author={Wu, Ti-Rong and Guei, Hung and Peng, Pei-Chiun and Huang, Po-Wei and Wei, Ting Han and Shih, Chung-Chin and Tsai, Yun-Jui},
  journal={IEEE Transactions on Games},
  year={2024},
  publisher={IEEE}
}

Outline

Overview

MiniZero utilizes zero-knowledge learning algorithms to train game-specific AI models.

It includes a variety of zero-knowledge learning algorithms:

  • AlphaZero
  • MuZero
  • Gumbel AlphaZero
  • Gumbel MuZero

It supports a variety of game environments:

  • Go
  • NoGo
  • Killall-Go
  • Gomoku / Outer-Open Gomoku
  • Othello
  • Hex
  • TicTacToe
  • Atari (57 games)

We are planning to add new algorithms, features, and more games in the future.

Architecture

The MiniZero architecture comprises four components: a server, self-play workers, an optimization worker, and data storage.

MiniZero Architecture

Server

The server is the core component in MiniZero, controlling the training process and managing both the self-play and optimization workers.

In each iteration, the server first instructs all self-play workers to generate self-play games simultaneously using the latest network and collects game records from self-play workers. Once the server accumulates the necessary self-play games, it then stops the self-play workers and instructs the optimization worker to load the latest game records and start network updates. After the network has been updated, the server starts the next iteration until the training reaches a predetermined maximum iteration.

Self-play worker

The self-play worker interacts with the environment to produce self-play games.

There may be multiple self-play workers. Each self-play worker maintains multiple MCTS instances to play multiple games simultaneously with batch GPU inferencing to improve efficiency. Specifically, the self-play worker runs the selection for each MCTS to collect a batch of leaf nodes and then evaluates them through batch GPU inferencing. Finished self-play games are sent to the server and forwarded to the data storage by the server.

Optimization worker

The optimization worker updates the network using collected self-play games.

Specifically, it loads self-play games from data storage and stores them into the replay buffer, and then updates the network over steps using data sampled from the replay buffer. Generally, the number of optimized steps is proportional to the number of collected self-play games to prevent overfitting. Finally, the updated networks are stored into the data storage.

Data storage

The data storage stores network files and self-play games.

Specifically, it uses the Network File System (NFS) for sharing data across different machines. This is an implementation choice; a simpler file system can suffice if distributed computing is not employed.

Results

The performance of each zero-knowledge learning algorithm on board games and Atari games are shown as follows, where α0, μ0, g-α0, and g-μ0 represent AlphaZero, MuZero, Gumbel AlphaZero, and Gumbel MuZero, and $n$ represents simulation count. More details and publicly released AI models are available here.

Results on board games:

Go 9x9Othello 8x8

Results on Atari games:

Atari

Prerequisites

MiniZero requires a Linux platform with at least one NVIDIA GPU to operate. To facilitate the use of MiniZero, a container image is pre-built to include all required packages. Thus, a container tool such as docker or podman is also required.

Show platform recommendations
  • Modern CPU with at least 64G RAM
  • NVIDIA GPU of GTX 1080 (VRAM 8G) or above
  • Linux operating system, e.g., Ubuntu 22.04 LTS
Show tested platforms
CPU RAM GPU OS
Xeon Silver 4216 x2 256G RTX A5000 x4 Ubuntu 20.04.6 LTS
Xeon Silver 4216 x2 128G RTX 3080 Ti x4 Ubuntu 20.04.5 LTS
Xeon Silver 4216 x2 256G RTX 3090 x4 Ubuntu 20.04.5 LTS
Xeon Silver 4210 x2 128G RTX 3080 x4 Ubuntu 22.04 LTS
Xeon E5-2678 v3 x2 192G GTX 1080 Ti x4 Ubuntu 20.04.5 LTS
Xeon E5-2698 v4 x2 128G GTX 1080 Ti x1 Arch Linux LTS (5.15.90)
Core i9-7980XE 128G GTX 1080 Ti x1 Arch Linux (6.5.6)

Quick Start

This section walks you through training AI models using zero-knowledge learning algorithms, evaluating trained AI models, and launching the console to interact with the AI.

First, clone this repository.

git clone [email protected]:rlglab/minizero.git
cd minizero # enter the cloned repository

Then, start the runtime environment using the container.

scripts/start-container.sh # must have either podman or docker installed

Once a container starts successfully, its working folder should be located at /workspace. You must execute all of the following commands inside the container.

Training

To train 9x9 Go:

# AlphaZero with 200 simulations
tools/quick-run.sh train go az 300 -n go_9x9_az_n200 -conf_str env_board_size=9:actor_num_simulation=200

# Gumbel AlphaZero with 16 simulations
tools/quick-run.sh train go gaz 300 -n go_9x9_gaz_n16 -conf_str env_board_size=9:actor_num_simulation=16

To train Ms. Pac-Man:

# MuZero with 50 simulations
tools/quick-run.sh train atari mz 300 -n ms_pacman_mz_n50 -conf_str env_atari_name=ms_pacman:actor_num_simulation=50

# Gumbel MuZero with 18 simulations
tools/quick-run.sh train atari gmz 300 -n ms_pacman_gmz_n18 -conf_str env_atari_name=ms_pacman:actor_num_simulation=18

For more training details, please refer to this instructions.

Evaluation

To evaluate the strength growth during training:

# the strength growth for "go_9x9_az_n200"
tools/quick-run.sh self-eval go go_9x9_az_n200 -conf_str env_board_size=9:actor_num_simulation=800:actor_select_action_by_count=true:actor_select_action_by_softmax_count=false:actor_use_dirichlet_noise=false:actor_use_gumbel_noise=false

To compare the strengths between two trained AI models:

# the relative strengths between "go_9x9_az_n200" and "go_9x9_gaz_n16"
tools/quick-run.sh fight-eval go go_9x9_az_n200 go_9x9_gaz_n16 -conf_str env_board_size=9:actor_num_simulation=800:actor_select_action_by_count=true:actor_select_action_by_softmax_count=false:actor_use_dirichlet_noise=false:actor_use_gumbel_noise=false

Note that the evaluations is generated during training in Atari games. Check ms_pacman_mz_n50/analysis/*_Return.png for the results.

For more evaluation details, please refer to this instructions.

Console

To interact with a trained model using Go Text Protocol (GTP).

# play with the "go_9x9_az_n200" model
tools/quick-run.sh console go go_9x9_az_n200 -conf_str env_board_size=9:actor_num_simulation=800:actor_select_action_by_count=true:actor_select_action_by_softmax_count=false:actor_use_dirichlet_noise=false:actor_use_gumbel_noise=false

For more console details, please refer to this instructions.

Development

We are actively adding new algorithms, features, and games into MiniZero.

The following work-in-progress features will be available in future versions:

  • Stochastic MuZero
  • Sampled MuZero

We welcome developers to join the MiniZero community. For more development tips, please refer to this instructions.

References

minizero's People

Contributors

alex10101025 avatar b08202011 avatar cglemon avatar ee-chiu avatar hung61601 avatar kds285 avatar llshang avatar moporgic avatar pengpeijun avatar q12we34rt5 avatar rockmanray avatar sodiumju avatar vipiao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

minizero's Issues

Worker Error and Training Failure on Running Script

Hi, I attempted to run your script but encountered an unexpected error. The attached terminal output screenshot indicated that the training process failed to complete.

Screenshot 2024-02-13 at 19 33 01

Below is the command line input that led to the error:

scripts/start-container.sh
tools/quick-run.sh train go az 300 -n go_9x9_az_n200 -conf_str env_board_size=9:actor_num_simulation=200

Please help me understand what is going wrong or provide any guidance on resolving this issue.

Thank you so much for your help.

tools/quick-run.sh train go az 300 -n go_9x9_az_n200 -conf_str env_board_size=9:actor_num_simulation=200 Error

(Version: 4d8301) [2024/07/11_10:03:20.280] [Version] 4d8301 terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr: __pos (which is 11) > this->size() (which is 0) scripts/zero-server.sh: line 133: 1518 Aborted (core dumped) ${sp_executable_file} -conf_file ${train_dir}/${new_configure_file} -conf_str ${conf_str} -mode zero_server Terminated User defined signal 1

compile from source error

I try to compile the project from source, use ubuntu 20.04
compile finished,but link error, i don't know how to fix the error, could you tell me?

here is cmake detail result

build type: Debug
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "11.0")
-- Caffe2: CUDA detected: 11.0
-- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda
-- Caffe2: Header version is: 11.0
-- Found CUDNN: /usr/local/cuda/lib64/libcudnn.so
-- Found cuDNN: v8.1.1 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s): 7.5
-- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75
-- Found Torch: /root/miniconda3/envs/py38/lib/python3.8/site-packages/torch/lib/libtorch.so
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: system thread iostreams
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found OpenCV: /usr (found version "4.2.0")
-- Found PythonInterp: /root/miniconda3/envs/py38/bin/python (found suitable version "3.8.19", minimum required is "3.6")
-- Found PythonLibs: /root/miniconda3/envs/py38/lib/libpython3.8.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /root/miniconda3/envs/py38/lib/python3.8/site-packages/pybind11/include (found version "2.12.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /root/project/minizero/build/tictactoe
Scanning dependencies of target utils
Scanning dependencies of target config

[ 8%] Built target utils
[ 16%] Built target config
[ 19%] Building CXX object minizero/zero/CMakeFiles/zero.dir/zero_server.cpp.o
[ 22%] Building CXX object minizero/environment/CMakeFiles/environment.dir/base/base_env.cpp.o
[ 25%] Building CXX object minizero/network/CMakeFiles/network.dir/network.cpp.o
[ 27%] Building CXX object minizero/environment/CMakeFiles/environment.dir/atari/atari.cpp.o
[ 30%] Building CXX object minizero/environment/CMakeFiles/environment.dir/go/go.cpp.o
[ 33%] Building CXX object minizero/environment/CMakeFiles/environment.dir/go/go_data_structure_check.cpp.o
[ 36%] Building CXX object minizero/environment/CMakeFiles/environment.dir/hex/hex.cpp.o
[ 38%] Building CXX object minizero/environment/CMakeFiles/environment.dir/gomoku/gomoku.cpp.o
[ 41%] Building CXX object minizero/environment/CMakeFiles/environment.dir/othello/othello.cpp.o
[ 44%] Building CXX object minizero/environment/CMakeFiles/environment.dir/rubiks/rubiks.cpp.o
[ 47%] Building CXX object minizero/environment/CMakeFiles/environment.dir/stochastic/puzzle2048/puzzle2048.cpp.o
[ 50%] Building CXX object minizero/environment/CMakeFiles/environment.dir/tictactoe/tictactoe.cpp.o
[ 52%] Linking CXX static library ../../libnetwork.a
[ 52%] Built target network
[ 55%] Linking CXX static library ../../libzero.a
[ 55%] Built target zero
[ 58%] Linking CXX static library ../../libenvironment.a
[ 58%] Built target environment
Scanning dependencies of target learner
Scanning dependencies of target actor
Scanning dependencies of target minizero_py
[ 61%] Building CXX object minizero/learner/CMakeFiles/learner.dir/data_loader.cpp.o
[ 63%] Building CXX object minizero/actor/CMakeFiles/actor.dir/base_actor.cpp.o
[ 66%] Building CXX object minizero/actor/CMakeFiles/actor.dir/actor_group.cpp.o
[ 69%] Building CXX object minizero/actor/CMakeFiles/actor.dir/gumbel_zero.cpp.o
[ 72%] Building CXX object minizero/actor/CMakeFiles/actor.dir/zero_actor.cpp.o
[ 75%] Building CXX object minizero/learner/CMakeFiles/minizero_py.dir/data_loader.cpp.o
[ 77%] Building CXX object minizero/learner/CMakeFiles/minizero_py.dir/pybind.cpp.o
[ 80%] Linking CXX static library ../../liblearner.a
[ 80%] Built target learner
[ 83%] Linking CXX shared module ../../minizero_py.cpython-38-x86_64-linux-gnu.so
[ 83%] Built target minizero_py
[ 86%] Linking CXX static library ../../libactor.a
[ 86%] Built target actor
Scanning dependencies of target console
[ 91%] Building CXX object minizero/console/CMakeFiles/console.dir/mode_handler.cpp.o
[ 91%] Building CXX object minizero/console/CMakeFiles/console.dir/console.cpp.o
[ 94%] Linking CXX static library ../../libconsole.a
[ 94%] Built target console
Scanning dependencies of target minizero
[ 97%] Building CXX object minizero/CMakeFiles/minizero.dir/minizero.cpp.o
[100%] Linking CXX executable ../minizero_tictactoe
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function minizero::console::ModeHandler::genConfiguration(minizero::config::ConfigureLoader&, std::string const&)': /root/project/minizero/minizero/console/mode_handler.cpp:108: undefined reference to minizero::config::ConfigureLoader::toString() const'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function minizero::console::ModeHandler::readConfiguration(minizero::config::ConfigureLoader&, std::string const&, std::string const&)': /root/project/minizero/minizero/console/mode_handler.cpp:114: undefined reference to minizero::config::ConfigureLoader::loadFromFile(std::string)'
/usr/bin/ld: /root/project/minizero/minizero/console/mode_handler.cpp:118: undefined reference to minizero::config::ConfigureLoader::loadFromString(std::string)' /usr/bin/ld: /root/project/minizero/minizero/console/mode_handler.cpp:123: undefined reference to minizero::config::ConfigureLoader::toString() const'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function minizero::console::ModeHandler::runZeroTrainingName()': /root/project/minizero/minizero/console/mode_handler.cpp:154: undefined reference to minizero::config::nn_type_name'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function minizero::console::ModeHandler::runEnvTest()': /root/project/minizero/minizero/console/mode_handler.cpp:170: undefined reference to minizero::env::tictactoe::TicTacToeEnv::toString() const'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::gzip_error::gzip_error(int)': /usr/include/boost/iostreams/filter/gzip.hpp:168: undefined reference to boost::iostreams::zlib::okay'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::gzip_header::gzip_header()': /usr/include/boost/iostreams/filter/gzip.hpp:327: undefined reference to boost::iostreams::detail::gzip_header::reset()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::gzip_footer::gzip_footer()': /usr/include/boost/iostreams/filter/gzip.hpp:369: undefined reference to boost::iostreams::detail::gzip_footer::reset()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function minizero::utils::compressToBinaryString(std::string const&)': /root/project/minizero/minizero/utils/utils.h:46: undefined reference to boost::iostreams::zlib::default_strategy'
/usr/bin/ld: /root/project/minizero/minizero/utils/utils.h:46: undefined reference to boost::iostreams::zlib::deflated' /usr/bin/ld: /root/project/minizero/minizero/utils/utils.h:46: undefined reference to boost::iostreams::zlib::default_compression'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::detail::thread_data_base::thread_data_base()': /usr/include/boost/thread/pthread/thread_data.hpp:162: undefined reference to vtable for boost::detail::thread_data_base'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::detail::interruption_checker::interruption_checker(pthread_mutex_t*, pthread_cond_t*)': /usr/include/boost/thread/pthread/thread_data.hpp:207: undefined reference to boost::detail::get_current_thread_data()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::thread::start_thread()': /usr/include/boost/thread/detail/thread.hpp:182: undefined reference to boost::thread::start_thread_noexcept()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::thread::~thread()': /usr/include/boost/thread/detail/thread.hpp:257: undefined reference to boost::thread::detach()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::thread::get_id() const': /usr/include/boost/thread/detail/thread.hpp:716: undefined reference to boost::thread::native_handle()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::thread::join()': /usr/include/boost/thread/detail/thread.hpp:740: undefined reference to boost::thread::join_noexcept()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::condition_variable::wait(boost::unique_lock<boost::mutex>&)': /usr/include/boost/thread/pthread/condition_variable.hpp:88: undefined reference to boost::this_thread::interruption_point()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::shared_mutex::lock_shared()': /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::disable_interruption()'
/usr/bin/ld: /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::shared_mutex::lock()': /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::disable_interruption()'
/usr/bin/ld: /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::thread_group::join_all()': /usr/include/boost/thread/detail/thread_group.hpp:118: undefined reference to boost::thread::joinable() const'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::thread_group::interrupt_all()': /usr/include/boost/thread/detail/thread_group.hpp:132: undefined reference to boost::thread::interrupt()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::basic_gzip_compressor<std::allocator<char> >::basic_gzip_compressor(boost::iostreams::gzip_params const&, long)': /usr/include/boost/iostreams/filter/gzip.hpp:666: undefined reference to boost::iostreams::zlib::best_compression'
/usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:669: undefined reference to boost::iostreams::zlib::best_speed' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::basic_gzip_decompressor<std::allocator >::make_params(int)':
/usr/include/boost/iostreams/filter/gzip.hpp:742: undefined reference to boost::iostreams::zlib::default_strategy' /usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:742: undefined reference to boost::iostreams::zlib::deflated'
/usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:742: undefined reference to boost::iostreams::zlib::default_compression' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::zlib_compressor_impl<std::allocator >::zlib_compressor_impl(boost::iostreams::zlib_params const&)':
/usr/include/boost/iostreams/filter/zlib.hpp:342: undefined reference to boost::iostreams::detail::zlib_base::zlib_base()' /usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:342: undefined reference to boost::iostreams::detail::zlib_base::~zlib_base()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::zlib_compressor_impl<std::allocator<char> >::~zlib_compressor_impl()': /usr/include/boost/iostreams/filter/zlib.hpp:347: undefined reference to boost::iostreams::detail::zlib_base::reset(bool, bool)'
/usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:347: undefined reference to boost::iostreams::detail::zlib_base::~zlib_base()' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::zlib_decompressor_impl<std::allocator >::zlib_decompressor_impl(boost::iostreams::zlib_params const&)':
/usr/include/boost/iostreams/filter/zlib.hpp:368: undefined reference to boost::iostreams::detail::zlib_base::zlib_base()' /usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:368: undefined reference to boost::iostreams::detail::zlib_base::~zlib_base()'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::zlib_decompressor_impl<std::allocator<char> >::~zlib_decompressor_impl()': /usr/include/boost/iostreams/filter/zlib.hpp:373: undefined reference to boost::iostreams::detail::zlib_base::reset(bool, bool)'
/usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:373: undefined reference to boost::iostreams::detail::zlib_base::~zlib_base()' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function void boost::iostreams::detail::zlib_base::init<std::allocator >(boost::iostreams::zlib_params const&, bool, boost::iostreams::detail::zlib_allocator<std::allocator, boost::iostreams::detail::zlib_allocator_traits<std::allocator >::type>&)':
/usr/include/boost/iostreams/filter/zlib.hpp:193: undefined reference to boost::iostreams::detail::zlib_base::do_init(boost::iostreams::zlib_params const&, bool, void* (*)(void*, unsigned int, unsigned int), void (*)(void*, void*), void*)' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, minizero::utils::BaseServerminizero::zero::ZeroWorkerHandler >, boost::_bi::list1<boost::_bi::value<minizero::utils::BaseServerminizero::zero::ZeroWorkerHandler> > > >::~thread_data()':
/usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function long boost::iostreams::basic_gzip_decompressor<std::allocator >::write<boost::iostreams::detail::linked_streambuf<char, std::char_traits > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits >&, char const
, long)':
/usr/include/boost/iostreams/filter/gzip.hpp:423: undefined reference to boost::iostreams::detail::gzip_header::reset()' /usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:424: undefined reference to boost::iostreams::detail::gzip_footer::reset()'
/usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:428: undefined reference to boost::iostreams::detail::gzip_header::process(char)' /usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:453: undefined reference to boost::iostreams::detail::gzip_footer::process(char)'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::zlib_compressor_impl<std::allocator<char> >::filter(char const*&, char const*, char*&, char*, bool)': /usr/include/boost/iostreams/filter/zlib.hpp:354: undefined reference to boost::iostreams::detail::zlib_base::before(char const*&, char const*, char*&, char*)'
/usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:355: undefined reference to boost::iostreams::zlib::finish' /usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:355: undefined reference to boost::iostreams::zlib::no_flush'
/usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:355: undefined reference to boost::iostreams::detail::zlib_base::xdeflate(int)' /usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:356: undefined reference to boost::iostreams::detail::zlib_base::after(char const*&, char*&, bool)'
/usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:357: undefined reference to boost::iostreams::zlib_error::check(int)' /usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:358: undefined reference to boost::iostreams::zlib::stream_end'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::zlib_decompressor_impl<std::allocator<char> >::filter(char const*&, char const*, char*&, char*, bool)': /usr/include/boost/iostreams/filter/zlib.hpp:388: undefined reference to boost::iostreams::detail::zlib_base::before(char const*&, char const*, char*&, char*)'
/usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:389: undefined reference to boost::iostreams::zlib::sync_flush' /usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:389: undefined reference to boost::iostreams::detail::zlib_base::xinflate(int)'
/usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:390: undefined reference to boost::iostreams::detail::zlib_base::after(char const*&, char*&, bool)' /usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:391: undefined reference to boost::iostreams::zlib_error::check(int)'
/usr/bin/ld: /usr/include/boost/iostreams/filter/zlib.hpp:392: undefined reference to boost::iostreams::zlib::stream_end' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::zlib_decompressor_impl<std::allocator >::close()':
/usr/include/boost/iostreams/filter/zlib.hpp:398: undefined reference to boost::iostreams::detail::zlib_base::reset(bool, bool)' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o):(.data.rel.ro._ZTIN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0IvN8minizero5utils10BaseServerINS6_4zero17ZeroWorkerHandlerEEEEENS2_5list1INS2_5valueIPSB_EEEEEEEE[_ZTIN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0IvN8minizero5utils10BaseServerINS6_4zero17ZeroWorkerHandlerEEEEENS2_5list1INS2_5valueIPSB_EEEEEEEE]+0x10): undefined reference to typeinfo for boost::detail::thread_data_base'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function minizero::env::BaseBoardAction<2>::toConsoleString() const': /root/project/minizero/minizero/environment/base/base_env.h:334: undefined reference to minizero::utils::SGFLoader::actionIDToBoardCoordinateString(int, int)'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function minizero::env::BaseEnvLoader<minizero::env::BaseBoardAction<2>, minizero::env::tictactoe::TicTacToeEnv>::loadFromString(std::string const&)': /root/project/minizero/minizero/environment/base/base_env.h:184: undefined reference to minizero::utils::SGFLoader::sgfStringToActionID(std::string const&, int)'
/usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function long boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >&, char*, long)': /usr/include/boost/iostreams/filter/gzip.hpp:469: undefined reference to boost::iostreams::detail::gzip_header::reset()'
/usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:470: undefined reference to boost::iostreams::detail::gzip_footer::reset()' /usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:479: undefined reference to boost::iostreams::detail::gzip_header::process(char)'
/usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:504: undefined reference to boost::iostreams::detail::gzip_footer::process(char)' /usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:515: undefined reference to boost::iostreams::detail::gzip_header::reset()'
/usr/bin/ld: /usr/include/boost/iostreams/filter/gzip.hpp:516: undefined reference to boost::iostreams::detail::gzip_footer::reset()' /usr/bin/ld: ../libconsole.a(mode_handler.cpp.o): in function boost::iostreams::detail::zlib_compressor_impl<std::allocator >::close()':
/usr/include/boost/iostreams/filter/zlib.hpp:362: undefined reference to boost::iostreams::detail::zlib_base::reset(bool, bool)' /usr/bin/ld: ../libconsole.a(console.cpp.o): in function minizero::console::Console::initialize()':
/root/project/minizero/minizero/console/console.cpp:40: undefined reference to minizero::config::nn_file_name' /usr/bin/ld: ../libconsole.a(console.cpp.o): in function minizero::console::Console::cmdLoadModel(std::vector<std::string, std::allocatorstd::string > const&)':
/root/project/minizero/minizero/console/console.cpp:211: undefined reference to minizero::config::nn_file_name' /usr/bin/ld: ../libenvironment.a(tictactoe.cpp.o): in function minizero::utils::compressToBinaryString(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)':
/root/project/minizero/minizero/utils/utils.h:46: undefined reference to boost::iostreams::zlib::default_strategy' /usr/bin/ld: /root/project/minizero/minizero/utils/utils.h:46: undefined reference to boost::iostreams::zlib::deflated'
/usr/bin/ld: /root/project/minizero/minizero/utils/utils.h:46: undefined reference to boost::iostreams::zlib::default_compression' /usr/bin/ld: ../libzero.a(zero_server.cpp.o): in function boost::condition_variable::do_wait_until(boost::unique_lockboost::mutex&, boost::detail::mono_platform_timepoint const&)':
/usr/include/boost/thread/pthread/condition_variable.hpp:131: undefined reference to boost::this_thread::interruption_point()' /usr/bin/ld: ../libactor.a(actor_group.cpp.o): in function minizero::actor::ActorGroup::initialize()':
/root/project/minizero/minizero/actor/actor_group.cpp:161: undefined reference to minizero::config::zero_actor_ignored_command' /usr/bin/ld: ../libactor.a(actor_group.cpp.o): in function minizero::actor::ActorGroup::createNeuralNetworks()':
/root/project/minizero/minizero/actor/actor_group.cpp:172: undefined reference to minizero::config::nn_file_name' /usr/bin/ld: ../libactor.a(actor_group.cpp.o): in function minizero::actor::ActorGroup::handleCommand(std::string const&, std::string const&)':
/root/project/minizero/minizero/actor/actor_group.cpp:228: undefined reference to minizero::config::nn_file_name' /usr/bin/ld: /root/project/minizero/minizero/actor/actor_group.cpp:229: undefined reference to minizero::config::nn_file_name'
/usr/bin/ld: /root/project/minizero/minizero/actor/actor_group.cpp:235: undefined reference to minizero::config::ConfigureLoader::loadFromString(std::string)' /usr/bin/ld: ../libactor.a(actor_group.cpp.o): in function boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, minizero::utils::BaseSlaveThread>, boost::_bi::list1<boost::_bi::value<std::shared_ptrminizero::utils::BaseSlaveThread > > > >::~thread_data()':
/usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: ../libactor.a(actor_group.cpp.o): in function boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, minizero::actor::ActorGroup>, boost::_bi::list1<boost::_bi::valueminizero::actor::ActorGroup* > > >::~thread_data()':
/usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: ../libactor.a(actor_group.cpp.o):(.data.rel.ro._ZTIN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0IvN8minizero5actor10ActorGroupEEENS2_5list1INS2_5valueIPS8_EEEEEEEE[_ZTIN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0IvN8minizero5actor10ActorGroupEEENS2_5list1INS2_5valueIPS8_EEEEEEEE]+0x10): undefined reference to typeinfo for boost::detail::thread_data_base'
/usr/bin/ld: ../libactor.a(actor_group.cpp.o):(.data.rel.ro._ZTIN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0IvN8minizero5utils15BaseSlaveThreadEEENS2_5list1INS2_5valueISt10shared_ptrIS8_EEEEEEEEE[_ZTIN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0IvN8minizero5utils15BaseSlaveThreadEEENS2_5list1INS2_5valueISt10shared_ptrIS8_EEEEEEEEE]+0x10): undefined reference to typeinfo for boost::detail::thread_data_base' /usr/bin/ld: ../libactor.a(base_actor.cpp.o): in function minizero::actor::BaseActor::act(std::vector<std::string, std::allocatorstd::string > const&)':
/root/project/minizero/minizero/actor/base_actor.cpp:34: undefined reference to minizero::env::tictactoe::TicTacToeEnv::act(std::vector<std::string, std::allocator<std::string> > const&)' /usr/bin/ld: ../libactor.a(base_actor.cpp.o): in function minizero::actor::BaseActor::getRecord(std::unordered_map<std::string, std::string, std::hashstd::string, std::equal_tostd::string, std::allocator<std::pair<std::string const, std::string> > > const&) const':
/root/project/minizero/minizero/actor/base_actor.cpp:46: undefined reference to minizero::config::nn_file_name' /usr/bin/ld: /root/project/minizero/minizero/actor/base_actor.cpp:46: undefined reference to minizero::config::nn_file_name'
/usr/bin/ld: ../libactor.a(zero_actor.cpp.o): in function minizero::actor::ZeroActor::think(bool, bool)': /root/project/minizero/minizero/actor/zero_actor.cpp:46: undefined reference to minizero::env::tictactoe::TicTacToeEnv::toString() const'
/usr/bin/ld: ../libactor.a(zero_actor.cpp.o): in function minizero::actor::ZeroActor::handleSearchDone()': /root/project/minizero/minizero/actor/zero_actor.cpp:161: undefined reference to minizero::config::nn_file_name'
collect2: error: ld returned 1 exit status
make[2]: *** [minizero/CMakeFiles/minizero.dir/build.make:165: minizero_tictactoe] Error 1
make[1]: *** [CMakeFiles/Makefile2:270: minizero/CMakeFiles/minizero.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.