GithubHelp home page GithubHelp logo

aic19-client-python's People

Contributors

armagg avatar hamidreza004 avatar ruhollahseka avatar sa1378 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aic19-client-python's Issues

Client Python

bade run kardane server va etesal client python , ye "preprocess" print mishe badesh error mide .
moshkelesh kojast ?
error :
AttributeError: 'World' object has no attribute '_World__game_constants'
man be source ha dast nazadam sefan hamoonaro test kardam.
client.log

"TypeError: can only concatenate str (not "HeroName") to str" after commit f4733cbf10782b6ecdd939de009792ea4996da90 (HEAD -> master, tag: v1.2, origin/master, origin/HEAD)

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/amirftma/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/home/amirftma/anaconda3/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/amirftma/Python/AIC/ourAIchallenge2019/Network.py", line 68, in run
    self.message_handler(self.receive())
  File "ourAIchallenge2019/Controller.py", line 72, in handle_message
    threading.Thread(target=self.launch_on_thread(self.client.pick, new_world)).start()
  File "ourAIchallenge2019/Controller.py", line 84, in launch_on_thread
    action(new_world)
  File "/home/amirftma/Python/AIC/ourAIchallenge2019/AI.py", line 61, in pick
    pick_up.select_hero()
  File "/home/amirftma/Python/AIC/ourAIchallenge2019/pickup.py", line 15, in select_hero
    logging.info("enemy hero %s" % opp)
  File "/home/amirftma/Python/AIC/ourAIchallenge2019/Model.py", line 164, in __str__
    return 'id:' + str(self.id) + '    name:' + self.name
TypeError: can only concatenate str (not "HeroName") to str

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/amirftma/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/home/amirftma/anaconda3/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/amirftma/Python/AIC/ourAIchallenge2019/Network.py", line 68, in run
    self.message_handler(self.receive())
  File "ourAIchallenge2019/Controller.py", line 72, in handle_message
    threading.Thread(target=self.launch_on_thread(self.client.pick, new_world)).start()
  File "ourAIchallenge2019/Controller.py", line 84, in launch_on_thread
    action(new_world)
  File "/home/amirftma/Python/AIC/ourAIchallenge2019/AI.py", line 61, in pick
    pick_up.select_hero()
  File "/home/amirftma/Python/AIC/ourAIchallenge2019/pickup.py", line 15, in select_hero
    logging.info("enemy hero %s" % opp)
  File "/home/amirftma/Python/AIC/ourAIchallenge2019/Model.py", line 164, in __str__
    return 'id:' + str(self.id) + '    name:' + self.name
TypeError: can only concatenate str (not "HeroName") to str

no time limit

man to move phase sleep(1) mikonam ya for toolani mizanam, server javab mide, mage nabayad time limit bokhore skip beshe ?

ارور در بررسی اینکه یک قابلیت به هدف اصابت می کند یا خیر

سلام
من سعی دارم بررسی کنم که آیا قابلیت هیروی سنتری به حریفی که توی دید یک هیروی دیگه هست اصابت می کنه یا خیر.
تاکید می کنم هیرو در محدوده سنتری نیست و در درد هیروی دیگه ای هست.
در فایل
model > line : 531 > def : get_impact_cells
به دلیل اینکه هیرو در محدوده دید خود سنتری نیست ارایه ای خالی برمی گردونه و این ارایه خالی باعث متوقف شدن برنامه در
model > line : 762 > def : self.get_cells_in_aoe()
می شود.
ارور کاملی که دریافت می کنم :

Exception in thread Thread-2:
Traceback (most recent call last):
 File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
   self.run()
 File "/usr/lib/python3.6/threading.py", line 864, in run
   self._target(*self._args, **self._kwargs)
 File "/home/geeksesi/univers/Ai_sharif/patronus/Network.py", line 68, in run
   self.message_handler(self.receive())
 File "patronus/Controller.py", line 83, in handle_message
   [new_world.current_turn])).start()
 File "patronus/Controller.py", line 88, in launch_on_thread
   action(new_world)
 File "/home/geeksesi/univers/Ai_sharif/patronus/AI.py", line 76, in action
   self.sentry_action(world, hero)
 File "/home/geeksesi/univers/Ai_sharif/patronus/AI.py", line 100, in sentry_action
   target_cell=opp_hero.current_cell
 File "/home/geeksesi/univers/Ai_sharif/patronus/Model.py", line 762, in get_ability_targets
   affected_cells.update(self.get_cells_in_aoe(cell, ability_constant.area_of_effect))
 File "/home/geeksesi/univers/Ai_sharif/patronus/Model.py", line 733, in get_cells_in_aoe
   for row in range(cell.row - area_of_effect, cell.row + area_of_effect + 1):
AttributeError: 'NoneType' object has no attribute 'row'

این ارور در مواقع دیگه مشاهده نمیشه و کد به درستی کار می کنه.دلیل اینکه بعضی اوقات در یکی از کلاینت ها چنین چیزی مشاهده می کنم رو نمی دونم.
مقادیری که من به تابع ارسال می کنم رو بررسی کردم ولی هیچ اشتباهی ندیدم.
اگر لازم می دونید مقادیر رو در زمان بروز مشکل بفرستم براتون

world.get_path_move_directions

تو این تابع هیرو های خودی در نظر گرفته نمیشن
و مسیری که پیشنهاد میده ممکنه از هیرو های خودی رد شه

world.get_path_move_directions

تابع چیزی بر نمی گردونه
hero1=world.get_hero(1)
cella=hero1.current_cell
hero2=world.get_hero(2)
cellb=hero2.current_cell
if cella==cellb:
print("OH!")
l=world.get_path_move_directions((cella.row,cella.column),(cellb.row,cellb.column))
print(l)

is_in_vision

این تابع اکسپشن می‌ده وقتی رو همه‌ی خونه‌ها فور می‌زنم و با یه خونه‌ی ثابت صدا می‌کنم

get_ability_targets returns error

world.get_ability_targets(ability=hero.abilities[2],
start_cell=hero.current_cell,
target_cell=end_cell)

{AttributeError}'NoneType' object has no attribute 'is_lobbing'

world.get_ability_targets(ability_name=Model.AbilityName.BLASTER_BOMB,
start_cell=hero.current_cell,
target_cell=end_cell)

{AttributeError}'AbilityName' object has no attribute 'is_lobbing'

pick hero

سلام
من تو گرفتن قهرمانا مشکل دارم، کسی میدونه چطور باید پیک بشن!؟
.
world.pick_hero(Model.HeroName.HEALER)
Model.World.pick_hero(world, hero_name=Model.HeroName.HEALER)
.
در هر صورت my hero خالیه یا چیز نامرتبطی داره

hero.name returns str instead of HeroName object

Hi,
in AI module, I write this code: (I pick 4 Sentry heroes in pick phase)

def action(self, world: Model.World):
    my_heroes: List[Model.Hero] = world.my_heroes
    hero = my_heroes[0]
        print(hero.name == HeroName.SENTRY)

>>> False

this peace of code results in false.
according to the AIC Docs, hero.name must be an instance of HeroName Enum, but it is a string.

another example that shows this issue:

print(hero.name)
>>> SENTRY
print(HeroName.SENTRY)
>>> HeroName.SENTRY

حرکت قهرمان

مگه تو مرحله ی حرکت هر کاراکتر نمی تونه یه بار جا به جا بشه؟
من که کد می زنم تو هر راند هر هیرو رو فقط یه بار جا به جا می کنه.

str funct for map is wrong

for row in self.row_num:

def __str__(self):
    string = ''
    for row in self.row_num:
        for col in self.column_num:
            string += str(self.get_cell(row, col))
        string += '\n'

self.column , self.row_num int hast o iteratesh error mide
ehtemalan bayad range(self.row_num) va range(self.column_num) bashe
tahesh ye return string ham mikhad
albate felan info ziadi nemide 😄

Compiling Error: ImportError: No module named queue

سلام. وقتتون بخیر.

Traceback (most recent call last): File "Controller.py", line 10, in <module> from queue import Queue ImportError: No module named queue

این ارور رو وقت کامپایل کردن فایل کنترلر دریافت می‌کنم. مشکل از کجاست؟!

move function doesnt work !

i just use a simple method to move my hero

world.move_hero(hero_id=heroes[0].id , hero=heroes[0] , direction=Model.Direction.DOWN)

i even tried it with two argument constructor , but it doesnt move 👍

world.move_hero(hero_id=heroes[0].id , direction=Model.Direction.DOWN)

in return i get :
None

Syntax error

client jadid be ye khat az kode Model.py gir mide mige syntaxesh eshtebahe :
if hero_id is not None and ability_name is not None and cell is not None:
in khatesho mige
vali syntaxesh doroste
chera injoorie?

run python client

سلام
من نمیدونم چطور باید کلاینت پایتون رو اجرا کنم. از پای چارم که گزینه ران رو میزنم هیچ اتفاقی نمی افته

all offensive ability types are None

all defensive ability types are ok
all dodge ability types are ok
but all offensive ability types are None

for my_hero in world.my_heroes:
    for ab in my_hero.abilities:
        print(ab.type)

Hero is not moving

من یه هیرو رو حرکت میدم ولی حرکت نمیکنه , خونه های کناریش هم دیوار نیست . توی هر جهتی هم تست میکنم کار نمیکنه , تازه جهت پایین اررور هم میده
روی هر سه نقشه تست کردم نشد

Hero is not moving 2

من از الگوریتم خودتون برای مسیریابی استفاده میکنم.
این الگوریتم یکم مشکل داره چون اینو درنظر نگرفته که هیرو های من هم با دیوار هیچ فرقی ندارن و نمیشه ازشون رد شد و چیزی که برمیگردونه با این فرضه که میشه

log

چطور میتونیم خروجی بازی رو بدون نمایشگر گرافیکی ببینیم تا یخورده بازی واضح تر بشه برامون؟؟

trying to connect #1

file controller.py ro run mikonam vali "trying to connect #1" mimone va nemishe dobare run zad bray client 2
(to cmd mizane "client accepted")

مشکل enum ها در توابع / python3

الان برای pick کردن هیرو توی پایتون منطقا باید این کار رو کرد:
game = Model.World()
game.pick_hero(Model.HeroName.SENTRY)

ولی این ارور از کلاینت دریافت میشه:
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/king0k/Documents/AI_Kill_Me_Python/AIC19-Client-Python-master/Network.py", line 68, in run
self.message_handler(self.receive())
File "Controller.py", line 72, in handle_message
threading.Thread(target=self.launch_on_thread(self.client.pick, new_world)).start()
File "Controller.py", line 84, in launch_on_thread
action(new_world)
File "/home/king0k/Documents/AI_Kill_Me_Python/AIC19-Client-Python-master/AI.py", line 11, in pick
game.pick_hero(Model.HeroName.SENTRY)
File "/home/king0k/Documents/AI_Kill_Me_Python/AIC19-Client-Python-master/Model.py", line 803, in pick_hero
self.queue.put(Event('pick', [hero_name.value]))
AttributeError: 'NoneType' object has no attribute 'put'

مگه نباید توی ورودی تابع pick_hero از enum هایی که ساخته شدن استفاده کرد پس چرا ارور میده؟

get_path_move_directions path heroes problem

photo_2019-02-12_14-23-05

هیرو شماره صفر*

مسیر برگردانده شده از تابع
get_path_move_directions
هیرو های خودی رو در نظر نمیگیره و باعث میشه هیرو در نقطه گیر کند و قابلیت حرکت نداشته باشد

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.