Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report bugs in Pandemic #180

Closed
youpengzhao opened this issue Mar 22, 2022 · 12 comments
Closed

Report bugs in Pandemic #180

youpengzhao opened this issue Mar 22, 2022 · 12 comments

Comments

@youpengzhao
Copy link

Well, we intend to participate in COG 2022 competition of Pandemic so we execute the code. However, we discover some bugs and report them here.

  1. The diseases can not be cured in one action. To be specific, if we use the antidote or the skill of medic to cure the disease of one colour in a city, only one disease can be removed. However, according to the rules, all these diseases should be removed. We think it is a serious bug as it makes the role of medic useless.
  2. The exchange of cards between players is unclear. If the players try to exchange the cards, we don't know who gives the card and who receives the card.
  3. The turn order of the games may be disrupted after using the event cards, for example, one player may be given another action step while someone's turn may be skipped.
@rdgain
Copy link
Collaborator

rdgain commented Mar 28, 2022

Thanks for pointing these out! We'll investigate and have a fix up asap.

@youpengzhao
Copy link
Author

Well, thank you for your updating. However, after running the program of newest version, we find that HumanGUIplayer can not work at all and HumanConsolePlayer also works strangely as it always says 'no available action' after only two actions in one turn, which we think will bring great difficulties to the training. What's more, when exchanging the card between players, we still don't know which card is exchanged. We hope these bugs can also be fixed. Thank you very much

@hopshackle
Copy link
Collaborator

Thanks for that - I've just tried the HumanGUIPlayer in a Pandemic game (with one other random player) using the current pandemic-competition branch, and it seems to work OK for me. (There was a bug, which was fixed yesterday morning - so I wanted to check you were using the latest version).

Could you then detail exactly what you're seeing with HumanGUIPlayer?

@youpengzhao
Copy link
Author

Sorry for not giving a response timely. I used to use code downloaded from the main branch and the GUI will show all legal actions for choice. But the operation way of current version seems to be different from old version that I use. So I thought there are bugs. Sorry for that.

@youpengzhao
Copy link
Author

Well, since current version changes the choice of action by clicking nodes in GUI, I think this brings new problems. Although medic can treat all diseases, other players' skills are hard to use, at least I don't know how to use them... Is there a readme file to tell us the information about the operations in the game? I think this will help a lot for developing the AI. Thank you very much.

@rdgain
Copy link
Collaborator

rdgain commented Apr 7, 2022

You can find a full description of how the GUI works in Pandemic on the website here: http://www.tabletopgames.ai/wiki/games/gui/pandemic

@youpengzhao
Copy link
Author

Thank you for your response. However, we find that when we execute the program using HumanGUIplayer, a bug will happen sometimes. The specific content is shown as below:
image

@youpengzhao
Copy link
Author

youpengzhao commented Apr 9, 2022

What's more, we don't know how to exchange cards between players and the website does not tell how this can be realised. We hope to know this information. Thank you very much. Also, we are also confused with some parameters in the configurations such as "nEpidemicCards", "nCubesEpidemic" , "nInfectionCardsSetup"."nInfectionsSetup","nCubesInfection", "nInitialDiseaseCubes"

@hopshackle
Copy link
Collaborator

Hi there,

Firstly, can I check that you are using the latest pandemic-competition branch? The error you report uses code that is in master, but not in pandemic-competition, so I suspect you might not have the latest pandemic version.

This latest pandemic version also includes the 'Share Knowledge' action to pass a card to another player (and the 'Researcher' special ability) - these are both explained in the GUI instructions at http://www.tabletopgames.ai/wiki/games/gui/pandemic. (However the Share Knowledge is not in the master branch - which may also explain why you are having some difficulty here).

And thank you for reporting your issues! It is very helpful to us to understand how people are using TAG.

(Separate answer to follow on the detailed meaning of parameters.)

@youpengzhao
Copy link
Author

Well, thank you for your response. We have tested the code and execute it successfully. However, I encounter a strange problem. My teammate can run the project successfully but when I configure the project as him, it fails. There seems to be problems that some external libraries can not be imported. I want to know whether is there any advice about the configuration?
image

@hopshackle
Copy link
Collaborator

Those video libraries should be loaded automatically by Maven from the pom.xml.

        <dependency>
            <groupId>io.humble</groupId>
            <artifactId>humble-video-all</artifactId>
            <version>0.3.0</version>
        </dependency>

I've seen Maven sometimes not pick up changes to dependencies immediately in IntelliJ (are you using IntelliJ, or some other IDE?), so it may be worth 'Relloading all Maven projects'.

(Screenshot of button in IntelliJ in case this is helpful)

MavenLoadArrow

rdgain added a commit that referenced this issue Apr 12, 2022
* Pandemic parameters update + running game with JSON param configuration

* Automatic video recording of games played with GUI option

- Can share gameplay videos for participants
- Some parameters for recording, currently in Game class, can be adjusted to be set on run

* Added option in Game and Frontend to put a pause between each decision (for video recording)

* Added a new method to run the competition setup for Pandemic with some game over related logging. Added a super easy config as well

* Added extra options in MCTS Params for Frontend

* Frontend can now have two MCTS agents with different parameterisations

* Attempting to implement Window to view AI decisions

* First working pop-up window in Frontend

* AI Decision window added to Frontend

* Load agent via Json in Frontend

* LeaderHeuristic for scoring

* Removed video stuff and added:

WinOnlyHeuristic
GameDefaultHeuristic

* Added two new heuristics, and moved tests

* New pom for maven build

* Fix for MCTS unit tests

* Added reward metrics to MCTS logging

* Fixed bug in RR tournament with N players and N+1 agents

In this case the order of the agents never changed

* Bugfix medic Pandemic treat all disease issue #180

* Introducing ShareKnowledge wrapper action to clarify giver and receiver player IDs for issue #180

* Fixed Pandemic discard reactions loops in game logic

* Count of cards for each type underneath player role

* Added video stuff back in for consistency with pandemic competition branch

* Fix ColtExpress unit test

To avoid spurious error reports

* Highlight on map selected card locations or players

* Pandemic: Cure disease only at research station (+ null pointer bug fix)

* Fixes to DiceMonastery unit tests

* Removed maven changes - except for test and build

* Fixed DiceMonastery unit test

* maven-assembly-plugin added

* Some null catching, and adding competition ranking according to published rules (alternative to full stats run in Pandemic)

- Run "core.pandemic.PandemicGame" class
- More info: http://www.tabletopgames.ai/competition/cog2022/

* Added a few 2 and 4 player configurations

* Pandemic competition: win clamp [0,1] for win rates, maximising ticks for ranking in losing games (minimised in winning games)

* Update PandemicGUIManager.java

* Pandemic bug fixes + GUI

- Share knowledge display and action interaction update in GUI
- Contingency planner logic fix
- Operations expert no action to move to current location
- Role allocation from game config fix

* Pandemic GUI fixes and improvements for buffer deck display and player areas

* GUI option for custom functions applied when action button clicked (besides highlight clearup), and Pandemic buffer deck reset added

* More Pandemic fixes (mostly GUI + events played during player's turn + RP reaction checks planner deck

- Forecast action is broken

Co-authored-by: hopshackle <james@janigo.co.uk>
Co-authored-by: martinballa <ballamartin95@gmail.com>
@hopshackle
Copy link
Collaborator

Hi there,

To address your question on what the parameters for a Pandemic game mean, an explanation of these has now been added to the competition web page at http://www.tabletopgames.ai/competition/cog2022/

rdgain added a commit that referenced this issue May 4, 2022
* Pandemic parameters update + running game with JSON param configuration

* Automatic video recording of games played with GUI option

- Can share gameplay videos for participants
- Some parameters for recording, currently in Game class, can be adjusted to be set on run

* Added option in Game and Frontend to put a pause between each decision (for video recording)

* Added a new method to run the competition setup for Pandemic with some game over related logging. Added a super easy config as well

* Added extra options in MCTS Params for Frontend

* Frontend can now have two MCTS agents with different parameterisations

* Attempting to implement Window to view AI decisions

* First working pop-up window in Frontend

* AI Decision window added to Frontend

* Load agent via Json in Frontend

* LeaderHeuristic for scoring

* Removed video stuff and added:

WinOnlyHeuristic
GameDefaultHeuristic

* Added two new heuristics, and moved tests

* New pom for maven build

* Fix for MCTS unit tests

* Added reward metrics to MCTS logging

* Fixed bug in RR tournament with N players and N+1 agents

In this case the order of the agents never changed

* Bugfix medic Pandemic treat all disease issue #180

* Introducing ShareKnowledge wrapper action to clarify giver and receiver player IDs for issue #180

* Fixed Pandemic discard reactions loops in game logic

* Count of cards for each type underneath player role

* Added video stuff back in for consistency with pandemic competition branch

* Fix ColtExpress unit test

To avoid spurious error reports

* Highlight on map selected card locations or players

* Pandemic: Cure disease only at research station (+ null pointer bug fix)

* Fixes to DiceMonastery unit tests

* Removed maven changes - except for test and build

* Fixed DiceMonastery unit test

* maven-assembly-plugin added

* Some null catching, and adding competition ranking according to published rules (alternative to full stats run in Pandemic)

- Run "core.pandemic.PandemicGame" class
- More info: http://www.tabletopgames.ai/competition/cog2022/

* Added a few 2 and 4 player configurations

* Pandemic competition: win clamp [0,1] for win rates, maximising ticks for ranking in losing games (minimised in winning games)

* Update PandemicGUIManager.java

* Pandemic bug fixes + GUI

- Share knowledge display and action interaction update in GUI
- Contingency planner logic fix
- Operations expert no action to move to current location
- Role allocation from game config fix

* Pandemic GUI fixes and improvements for buffer deck display and player areas

* GUI option for custom functions applied when action button clicked (besides highlight clearup), and Pandemic buffer deck reset added

* More Pandemic fixes (mostly GUI + events played during player's turn + RP reaction checks planner deck

- Forecast action is broken

* Adding loss condition: no more infection cards to draw

This wasn't necessary in the original game, as all other conditions would trigger first. With modified parameters, it may be that we run out of infection cards too - this means a loss for the players.

* Some more fixes

* Move types better specified

* Updated the training configurations

* Pandemic fixes?

* Update PandemicCompetitionRankingAttributes.java

* Update PandemicForwardModel.java

* Update MovePlayerWithCard.java

* Update ForceDiscardReaction.java

Discard reaction fixed, it may be that other player was traded with and their hand is over capacity, rather than 'current' player

* Changes:
- PandemicGame runCompetition if seed == -1 it generates a random seed
- Fixed the bug in the heuristic which return 0 all the time when the game was over
- Added a new feature in the heuristic that checks when the player is at a research station
- PandemicListener logs the infectionDeck size

Co-authored-by: hopshackle <james@janigo.co.uk>
Co-authored-by: martinballa <ballamartin95@gmail.com>
Co-authored-by: Martin Balla <m.balla@qmul.ac.uk>
@rdgain rdgain closed this as completed Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants