kimbring2 / AlphaStar_Implementation

This project is implementation code of AlphaStar
Apache License 2.0
187 stars 26 forks source link

ImportError Canot import Scalar Encoder #1

Closed worldsoft closed 3 years ago

worldsoft commented 4 years ago

when running the alphastar.py, it gives this error: ImportError Canot import Scalar Encoder

kimbring2 commented 4 years ago

Hello,

I recently removed Scalar Encoder from main network. It looks like you tried to run alphastat.py file. 

I could not update it because of another preprocessing implementation supervised.py

You can run simple training by running env_test.py file of root of Repo.

worldsoft commented 4 years ago

Thank you. and when will the alphazero.py work?

worldsoft commented 4 years ago

Another problem when running the env_test.py, it displays an error: File random.py line 260, in choice raise IndexError("Cannot choose from an empty sequence') from None IndexError^ Cannot choose from an empty sequence.

kimbring2 commented 4 years ago

@worldsoft Hmm. I am not sure. However, It will take over month to implement everything. Currently, I am checking Supervised Learning is going well.

worldsoft commented 4 years ago

Thanks

majesticblvd commented 4 years ago

@worldsoft, Make sure you update /media/kimbring2/Steam/StarCraftII/Replays/ in trajectory_test.py and env_test.py and also change the tf.summary.create_file_writer path to a local path on your machine. Make sure you also have at least 8 TvT replays in that directory (you can lower the batch_size if you have less).

@kimbring2 Nice work so far, very exciting project!

kimbring2 commented 4 years ago

@majesticblvd Thank you for your cheers. I will update more soon!

worldsoft commented 3 years ago

@worldsoft, Make sure you update /media/kimbring2/Steam/StarCraftII/Replays/ in trajectory_test.py and env_test.py and also change the tf.summary.create_file_writer path to a local path on your machine. Make sure you also have at least 8 TvT replays in that directory (you can lower the batch_size if you have less).

@majesticblvd, Thanks to this problem I solved, it worked. However, another error appeared: env_test.py line 278, env_test.py line 216. ValueError: need at least one array to concatenate

majesticblvd commented 3 years ago

@worldsoft I encountered the error on line 278 as well, make sure you have only TvT's in your replay folder and the same amount or more as batch_size. The replays also need to be from the current patch (it didn't work for me initially when trying with older replays).

worldsoft commented 3 years ago

@majesticblvd I can't figure out where to find or check this TvT. Where can I find information about my TvT

worldsoft commented 3 years ago

@worldsoft, Make sure you update /media/kimbring2/Steam/StarCraftII/Replays/ in trajectory_test.py and env_test.py and also change the tf.summary.create_file_writer path to a local path on your machine. Make sure you also have at least 8 TvT replays in that directory (you can lower the batch_size if you have less).

@majesticblvd, Thanks to this problem I solved, it worked. However, another error appeared: env_test.py line 278, env_test.py line 216. ValueError: need at least one array to concatenate

The problem was with the replay version. I solved the problem by adding the version number to the string run_config = run_configs.get(version='4.8.2') However, a new error came out: File "<string">", line 3, in race_from tensorflow.python.framework.errors_impl.InvalidArgumentError: ConcatOp : Dimensions of inputs should match^ shape[0] = [1,1,32,32] vs. shape[1] = [1,28,16,16] [Op:ConcatV2] name: concat.