Comments (7)
stuck at this problem for nearly a week....can anyone give me some help?
really thanks!
@TimZaman @Nostrademous
from dotaservice.
I comment out
dotaservice/dotaservice/lua/bot_generic.lua
Lines 174 to 190 in 5a413e3
then problem fixed..I can receive world state normally. it seems has some time-consuming thing or deadlock in these code..
from dotaservice.
Purely from memory - I would think ‘get_new_action’ is the issue as it expects a file to be written by the gRPC client that the bots read from the bots directory. Perhaps it doesn’t have a timeout. On phone so hard to check
from dotaservice.
from dotaservice.
Purely from memory - I would think ‘get_new_action’ is the issue as it expects a file to be written by the gRPC client that the bots read from the bots directory. Perhaps it doesn’t have a timeout. On phone so hard to check
yes, that may be a problem, my test client just use the observe rpc, so the lua is blocking at this function.
from grpclib.client import Channel
from dotaservice.protos.DotaService_grpc import DotaServiceStub
from dotaservice.protos.DotaService_pb2 import GameConfig
from dotaservice.protos.DotaService_pb2 import Actions
from dotaservice.protos.DotaService_pb2 import ObserveConfig, Status
from dotaservice.protos.DotaService_pb2 import TEAM_RADIANT, TEAM_DIRE
import asyncio
from dotaservice.protos.dota_gcmessages_common_bot_script_pb2 import CMsgBotWorldState
from dotaservice.protos.dota_shared_enums_pb2 import DOTA_GAMEMODE_1V1MID
import time
async def game_init():
await env.reset(GameConfig(ticks_per_observation=10, host_mode=1))#, game_mode=DOTA_GAMEMODE_1V1MID))
print("init finish")
for i in range(1000):
action_pb = CMsgBotWorldState.Action()
action_pb.actionType = CMsgBotWorldState.Action.Type.Value('DOTA_UNIT_ORDER_NONE')
actions_pb = CMsgBotWorldState.Actions(actions=[action_pb])
execute_action = Actions(actions=actions_pb, team_id=TEAM_RADIANT)
#await env.act(execute_action)
response = await env.observe(ObserveConfig(team_id=TEAM_RADIANT))
if response.status != Status.Value('OK'):
print("response status %s"%str(response.status))
obs = response.world_state
dota_time = obs.dota_time
print("cur time %s" %str(dota_time))
time.sleep(1)
print("finish")
return
# Connect to the DotaService.
cur_loop = asyncio.get_event_loop()
env = DotaServiceStub(Channel('127.0.0.1', 13337, loop=cur_loop))
# Get the initial observation.
cur_loop.run_until_complete(game_init())
from dotaservice.
from dotaservice.
ok, thanks
from dotaservice.
Related Issues (20)
- Dotaservice deadlocks itself HOT 1
- Time sync of radiant/dire teams upon reset not stable. HOT 10
- how to remove the fog of war? HOT 8
- lane creep not spawn HOT 7
- AI vs Human/Buildin-AI play mode
- how to cast skill? HOT 20
- can not get the enemy lane creep info in world state HOT 3
- DebugDrawLine doesn't draw the correct line HOT 3
- Capture end-of-game signal HOT 2
- what the usage of actionDelay? HOT 3
- the head length of world state message is not correct HOT 5
- Dota2 Docker Error HOT 2
- Add DotaService Proto for Hero Selection HOT 3
- dota2 docker running problem HOT 9
- Minimal Working Example of client.py HOT 18
- Render in Macbook pro HOT 6
- How can i know a unit is visible to a team? HOT 2
- Docker: pull access denied for dota HOT 1
- where does the proto files come from? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotaservice.