forvkusa
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # An unnamed fungus infection game [![hackmd-github-sync-badge](https://hackmd.io/UA6qYTipSo2UOPVNs9QtFA/badge)](https://hackmd.io/UA6qYTipSo2UOPVNs9QtFA) ## Introduction & Rules This is a game about Ophiocordyceps unilateralis, aka zombie-ant fungus, infecting ants. The game never stops (and so does the server) so that players can join the game as long as the server does not terminate unexpectedly. The field (aka map) of the game consists of 500x300 grids. The size of field may be altered by the server owner (aka game host) before the game starts. Each player control some tribes of a distinct subspecies of Ophiocordyceps unilateralis, which takes over some ant's corpse on the map. Each ant's corpse is at the fixed position (represented by $(x_i, y_i)$, occupied by a player (i.e., a tribe of a subspecies of zombie-ant fungus) and spans an "infection zone", which might infect the ants passing by at some rate (the probability of infection of an ant passing by is defined as a value stored by the corresponding corpse). Note that the infection zone must be a circle if there is no other infection zone around. In particular, each corpse (or, tribe of zombie-ant fungus) embodies the following values: 1. The infection probability of the infection zone created by the tribe. 2. Defense value (DEF): This is related to how long the corpse the its infection zone could last the on the field and whether a tribe owned by this subspecies (or, player) can successfully thwart the invasion of other tribes of zombie-ant fungus nearby, controlled by other players, contending for area (i.e., grids) on the field that is both covered by the infection zone of this corpse and in the "circle" of the infection zone that is about the be created by the invading (aka attacking) tribe. If the ATK of the invading tribe is higher than the DEF of that of this tribe, which is the invaded tribe, the area mention above will then be taken over by the invading tribe and hence the invaded tribe will "lose" this area of its infection zone; otherwise, the invading tribe cannot take over this area and nothing happens. That is, a tribe loses a portion of its infection zone whenever some other tribe with a ATK higher than host's DEF creates its infection zone that covers that portion of field. 3. Attack value (ATK): This is related to whether a tribe owned by the player can successfully invade other tribe of other players to claim the area where its infection zone yet to be created should cover when the tribe is newly created, as described above. 4. Radius of the infection zone (a circle). Note that when the grid where the corpse is located (i.e., the grid at position $(x_i, y_i)$) is taken over by a tribe of some other player as a result of invasion, the corpse and the corresponding tribe are eliminated from the game field, meaning that the player has lost this tribe. Meanwhile, the grid where the corpse was previously located is now in the infection zone of the invading tribe. Also, each subspecies of zombie-ant fungus, which corresponds to a player, embodies the following values: 1. Base-DEF: the initial DEF of a newly created tribe owned by the player. 2. Base-ATK: the initial ATK of a newly created tribe owned by the player. 3. Base infection probability of the infection zone created by any tribe of the player. Note that the DEF, ATK, and infection probability of the infection zone of each tribe will decrease by some rate, which should also be able to be altered by the host of the game before the game starts. Besides, each corpse of will eventually "dies" and be eliminated from the field due to microbial and scavenger attack. As a result, the corresponding tribe and infection zone will also be eliminated. As the DEF of a tribe is strongly related to how likely the tribe can successfully defend attacks from microbial and scavenger, at any time in the game, if the DEF of a tribe reaches 0, then its corpse dies and it is thus eliminated, including its infection zone. When an ant is infected a subspecies of zombie-ant fungus when passing by an infection zone of one of its tribes at some position (aka grid), the corresponding player that owns the subspecies can then decide to control where the infected ant should take "the death bite" and then create a new tribe of the subspecies owned by the player. In particular, the player is responsible for choosing a position (aka grid) on the field to create a tribe, and then the server will create a tribe for the player, where the tribe has DEF=Base-DEF, ATK=Base-ATK, infection probability = base infection probability, and the newly created tribe will create its infection zone immediately, during which invasion might take place. ## Run a game server (NO installation required) 1. Make sure [Python3](https://www.python.org/downloads/) is installed in your environment. (Using Linux as the environment is strongly preferred!) 1. Get `server.py` in your directory. You can choose to download it from either: + Github repo (here!) + or [workstation](https://www.csie.ntu.edu.tw/~b11902015/bio-game/server.py) 2. Acquire execution permission: `chmod u+x <path_to_client.py>` 3. Run `server.py` directly: `<path_to_server.py> <bind_ip> <bind_port>` + e.g. `./server.py 0.0.0.0 48763` ## Run a game client (NO installation required) 1. Make sure [Python3](https://www.python.org/downloads/), along with [blessed](https://pypi.org/project/blessed/), is installed in your environment. (Using Linux as the environment is strongly preferred!) 1. Get `client.py` in your directory. You can choose to download it from either: + from Github repo (here!) + from [workstation](https://www.csie.ntu.edu.tw/~b11902015/bio-game/client.py) 2. Acquire execution permission: `chmod u+x <path_to_client.py>` 3. Run `client.py`: `<path_to_client.py> <server_ip_or_domainname> <server_port>` + e.g. `./client.py ws2.csie.ntu.edu.tw 48763` (supposing the server is run on `ws2.csie.ntu.edu.tw:48763`.) ## How to play the game + Press `SPACE` to start deciding where to create a new tribe. + Now you can use the arrow keys to move the red block used to mark your desired location for the new tribe. + Press `ENTER` to confirm the location for the new tribe. + Press `q` to leave the game. + A player lose the game iff he does not own any tribe and has run out of chances to create a new tribe.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully