bccn-prog / 2019_elegant Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Already done multithreading in the kd_tree for the methods that directly operate on the tree.
To see how long methods take to run, either run
python -m cProfile main.py
on the shellcontroller.game_loop()
in main.py with cProfile.run('controller.game_loop()')
To interpret columns, see https://docs.python.org/3/library/profile.html:
- ncalls for the number of calls.
- tottime for the total time spent in the given function (and excluding time made in calls to sub-functions)
- percall is the quotient of tottime divided by ncalls cumtime is the cumulative time spent in this and all subfunctions (from invocation till exit). This figure is accurate even for recursive functions.
- cumtime is the cumulative time spent in this and all subfunctions (from invocation till exit). This figure is accurate even for recursive functions.
We probably have to do a lot of timers. How should we implement this. Look at Safas' Code and maybe do a seperate function for that.
Player are created with (name, color). Currently, the name gets assigned a color and vice versa. I think it occurs in start_button_pressed in controller/controller.
Think about and implement the events for scouts, soldiers, worker
TBD:
Refactor Controller
Currently if pressing the create ant button a circle for the waiting time is created. This is not in sync though with the creation of the ants.
The circle is completed and the ant counter increases but the ant is created later. This is I think due to the timing set explicitly in the create ant function in controller.
Initially they inactivated themselves at the nest after delivering food, but currently they deactivate themselves at the position where they found the food.
Sometimes Ants simply disappear.
Is this due to the ants dying and getting there position deleted?
As Rosa mentioned: What if there are many objects in equally distance distance that get returned from the get_k_nearest_neighbours? (Implementation now will return more than k objects, but ants should also not be able to process infinite amount of objects).
Idea:
Ants have a new variable self.k_objects_processable -> When they get objects in their surrounding, they are only able to process k objects. Thus, when they are given objects in their surrounding, it would make sense to 'process' them in a way that only k get noticed. This could also involve assigning priority (e.g., enemies first, then food, then pheromones).
Hey everyone,
In the implemented full-screen mode of our game, a crucial component is the quit button(the normal option buttons wont be visible anymore). Since the controller receives the event of a click, we (View team) would like to request for implementing the same. P.S: We could implement this by calling the quit button via its ID (quit_button) using the function (get_element_by_id) and then implement the system quit option. This needs to be implemented both in the game view and in the start view.
Kindly DO NOT run the view without implementing this function as none of the other operating systems but Windows have an option to quit from the game.
The class ant and ant-nest should be a view_element and not a ui_element
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.