All Projects → huangyz0918 → TankLogo

huangyz0918 / TankLogo

Licence: Apache-2.0 license
1v1 tank war model built by NetLogo 💥

Programming Languages

NetLogo
10 projects

Projects that are alternatives of or similar to TankLogo

fork-this
They say I'm invisible! Fork this, I'm original!
Stars: ✭ 45 (-10%)
Mutual labels:  tech
teaching-computational-geophysics
Additional material for computational geophysics course
Stars: ✭ 35 (-30%)
Mutual labels:  teaching
playgrounds
DEPRECATED. A collection of playgrounds for teaching Swift programming concepts.
Stars: ✭ 45 (-10%)
Mutual labels:  teaching
resources
A curated collection of useful tech resources 💻
Stars: ✭ 57 (+14%)
Mutual labels:  tech
teaching
Courses & workshops led by members of the Krishnan Lab.
Stars: ✭ 23 (-54%)
Mutual labels:  teaching
Everything-Tech
A collection of online resources to help you on your Tech journey.
Stars: ✭ 396 (+692%)
Mutual labels:  tech
Online R learning
Online R learning for applied statistics
Stars: ✭ 132 (+164%)
Mutual labels:  teaching
how-to-api
Workshop to teach how to use and make an API
Stars: ✭ 16 (-68%)
Mutual labels:  teaching
stack-cs-activities
A stack of activities to teach advanced computer science (developed by the Teaching Lab community at the Faculty of Informatics, Masaryk University)
Stars: ✭ 20 (-60%)
Mutual labels:  teaching
deep learning ecology
Educational Resources on Neural Networks for Ecology and Remote Sensing
Stars: ✭ 45 (-10%)
Mutual labels:  teaching
pocketinternet
A Pocket Internet for teaching how the Internet really works.
Stars: ✭ 28 (-44%)
Mutual labels:  teaching
ontask b
A platform offering teachers and educational designers the capacity to use data to personalise the learner experience.
Stars: ✭ 31 (-38%)
Mutual labels:  teaching
School-Programming
Хранилище за свободно учебно съдържание по програмиране, информатика и ИТ за българските училища
Stars: ✭ 82 (+64%)
Mutual labels:  teaching
checkdown
R package for Rmarkdown for creating autocheck questions and hints
Stars: ✭ 25 (-50%)
Mutual labels:  teaching
salary-negotiation-tech
Articles and posts on salary negotiation for devs/nerds/software engineers/tech people.
Stars: ✭ 53 (+6%)
Mutual labels:  tech
Ensembler
Ensembler is a python package that provides fast and easy access to 1D and 2D model system simulations. It can be used for method development or to deepen understanding of a broad spectrum of modeling methods, from basic sampling techniques to enhanced sampling and free energy calculations. It is easy to install, fast, increases shareability, co…
Stars: ✭ 42 (-16%)
Mutual labels:  teaching
Floatplane-Downloader
Project for automatically organizing and downloading Floatplane videos for plex.
Stars: ✭ 94 (+88%)
Mutual labels:  tech
CodeWars
Daily Coding Exercises to sharpen problem solving skills
Stars: ✭ 67 (+34%)
Mutual labels:  tech
teach-r
List of Resources for Teaching R
Stars: ✭ 16 (-68%)
Mutual labels:  teaching
battle-city
Remake of Battle City on Python
Stars: ✭ 26 (-48%)
Mutual labels:  tank-game

TankLogo

platform contributions

A tank war strategy built by NetLogo. Share your ideas and strategies and win the game!

Want to have a try? See demo.

You can see two kinds of tank here:

  • The Red one
  • The Blue one

In this project, the red tank has a temporary strongest strategy, which means it is very strong and you may lose it easily. You can not modify the code of the red one, but you can modify the blue one, and make it better than the red one.

If you have made your blue tank stronger than the red tank, You win! 💥

You can submit your tank strategy (yours blue tank code) through a pull request, and we will update our red tank code according to your blue tank code until there is another better blue tank to beat yours. During this time, your github id and avatar will displaied in the README.md here.

It's like a game of fighting, let's cheer, the first place is yours!

What's NetLogo?

You can checkout for more information at it's homepage.

Here is the definition of NetLogo programming language from wikipedia:

NetLogo was designed, by Uri Wilensky, in the spirit of the Logo programming language, to be "low threshold and no ceiling". It teaches programming concepts using agents in the form of turtles, patches, links and the observer. NetLogo was designed for multiple audiences in mind, in particular: teaching children in the education community, and for domain experts without a programming background to model related phenomena. Many scientific articles have been published using NetLogo.

After all, it's a very easy programming language which can let you focus more on the programming logic of our battles.

How to get start?

  • Install NetLogo in your machine or using the NetLogo Web.
  • Open the TankLogo.nlogo file (upload to the web server or double click in your computer).
  • See the UI, and click the setup button, and you can see the yellow boundary which means the wall.
  • Type a name for the red tank (or the blue one) in the TankName (input box), and click create tank button.
  • Type another name for the another tank in TankName (input box), and click create tank button to create it.
  • Use button run to begin the battle, use reset button to restart a game.

The Tank Battle Strategy

Introduction to the UI:

  • The setup button: Initialize the user interface.
  • The reset button: Reset the war.
  • The go button: Start animation and confrontation.
  • You can use the TankName to put a name for your tank before creating it.
  • You can set the FirePower through the progress bar, which is the power of per bullet.
  • If you want to watch the track of tanks, you can set the LeaveTrack? to on.

The finite element state machine was used for the core part of this tank war game. We set the default status to status-forward[v] , status-dodge-forward[args] or status-random-forward[tickNum], they have diffierent characteristics and downsides:

  • In the status status-forward[v], the tank will use the v as it's velocity to move forward.
  • In status status-back, status-right, status-left and status-stop, the tank will go back, turn right/left and just stop.
  • status-random-forward[tickNum] allows the tank to move forward at a random direction in a fixed time interval, which is can be set by input paramemter tickNum.
  • status-dodge-forward[args] is a pretty tricky status, if other tank shooting by aiming at your tank, the best dodge strategy is to move in a direction perpendicular to its direction of motion, since the bullet has a delay before hitting yours.

Contribution Guides

The NetLogo is a pretty easy programming language, we wish you can get start as soon as possible, so if you have any question about NetLogo, please check out for the official document.

In this project, the only area you can modify are marked in the code via comments, you cannot make any changes related to the red tank, or we wouldn't accept your PR and update yours strategy.

In your code, you can not modify the opponent's attributes, such as resetting the health and velocity of the red tank, but you can detect others' attributes. For example, you can detect the patch of the red code using patch-here.

To do some contributions, you need to install NetLogo firstly then clone your fork, double click the TankLogo.nlogo and run!

FAQ

Why choose NetLogo as programming language?

Because NetLogo is quite easy and there are less people know how to use it than other languages, so if you want to get start, everybody is equal.

How can I get start ?

Two steps, the first is install NetLogo. The second one is clone this repo and double click the .nlogo file and improve the tank.

How can I get if I win your tank ?

The best tank will update according to your solution, and your Github avatar and name will display until somebody beats yours.

How to submit my solution ?

Fork this repo and improve your code, test if it can really win the red tank, submit a pull request, done!

If I don't want to install NetLogo, how can I get start?

You can use NetLogo Web to run your code.

Licence

   Copyright 2018 Yizheng Huang

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].