Skip to content

vufa/AmazonEdge

Repository files navigation

AmazonEdge

Build Status: Build Status

简体中文

AmazonEdge is an AI for Game of Amazons, based on neural networks with supervised learning and reinforcement learning.

Environment

  • python 2.7
  • Anaconda3(Recommend)

For Linux:

1.Create an Anaconda environment for AmazonEdge(Recommend)

conda create -n AmazonEdge python=2.7	# Create an environment named AmazonEdge with python2.7
source activate AmazonEdge	# Enter this environment

2.Install dependency packages

pip install -r requirements.txt

3.Use tensorflow as Keras backend

pip install tensorflow

Edit ~/.keras/keras.json to

{
    "image_dim_ordering": "tf", 
    "epsilon": 1e-07, 
    "floatx": "float32", 
    "backend": "tensorflow"
}

Phase 1: Supervised Learning and Policy Networks

Generate hdf5 file from actions file

python -m tools.actions_to_feature_layers

The input file at data/actions/actions.txt and the output file at data/hdf5/, you can edit tools/actions_to_feature_layers as needed.

Supervised training

To see what arguments are available, use

python -m AmazonEdge.training.supervised_policy_trainer --help

1.Get a model file(A json specifying the policy network's architecture)

python -m build/create_model MODEL_NAME.json MODEL_PATH

2.Running Supervised training test

python -m tests.test_supervised_policy_trainer

Releases

No releases published

Packages

No packages published