[Contest] Green Circle

I should have lost two bonus cards in the end-of-cycle process on my second move action, but I only lost one.

                //only one card type => automatic throw
                for (int i = 0; i < 2; ++i) {
                    Card thrownCard = throwableCards.get(0);
                    player.removeCardInHand(thrownCard);
                    if (thrownCard.isGoodActionBonus()) {
                        bonusCardsPool.push((BonusCard) thrownCard);
                    } else {
                        zones[thrownCard.getCardType().ordinal()].returnCard(thrownCard);
                    }
                    gameSummaryManager.addThrowCard(player, thrownCard);
                    view.playerThrowsCard(0.5, thrownCard);
                }

I checked the end-of-cycle process and found that if there is only one skill card type, it is automatically discarded, but it seems that the same object is specified as the target of the removed card, so only one card is removed.

1 Like

There seems to be a typo in the statement.

In “Input for One Game Turn” section, there’s a sentence which says:

“permanentArchitectureStudyCards : the amount of ARCHITECTURE_STUDY (2) cards played.”

which the correct ID of this skill is 4, not 2.

Also, in the same section, it is written “Line 1: gamePhase the name of the current game phase. It can be MOVE, RELEASE”, but in Bronze league it actually can be MOVE, GIVE_CARD, THROW_CARD, PLAY_CARD, and RELEASE.

1 Like

The starter AI in java does not run! Please fix it.

At turn 53 in this replay, I used TRAINING card then draw two CODING cards, but the next input is RELEASE phase, not PLAY_CARD. Why is the PLAY_CARD phase skipped? It should be that after using TRAINING card, I can use one more card.

4 Likes

TASK_PRIORITIZATION fails when CONTINUOUS_INTEGRATION is selected as the throw away card, if the player has less than 2 of the latter in hand.

Replay with the issue:

Screenshot of the viewer:
Imgur

Pull request for the fix:

2 Likes

Yeah, this seems to be a bug:

You can clearly see I have more actions to do, but it goes straight to Release.

2 Likes

confirm this. same with the skill coding (uses the same rules). Also the “Random” out provides always the same result.

I think swapping discard and draw fixes this bug.

you mean drawing first the cards, then discarding the card you played?
Won’t we still have the loop if the player has 2 TRAINING cards in hand?

hi, i found a bug it seems weird (infinite loop ?) after turn 20 : https://www.codingame.com/replay/641776075

Yes, if you empty your draw and discard pile, you can currently do infinite training/coding.
We’re fixing it with @Illedan
Our fix is being tested in a branch (if you want to review the code, it’s here : https://github.com/societe-generale/GreenCircle/tree/FixInfiniteLoop)

2 Likes

Merged.
We’ll plan a release once we’ve fixed the big bugs

Endless draw should be fixed here:

(4th league)

Fixed : GreenCircle/Starter.java at master · societe-generale/GreenCircle · GitHub

It looks still possible to loop by CODING-> (DAILY_ROUTINE or something) ->TRAINING, starting with one card in deck. Is this acceptable?

My naive idea to prevent loop is to prohibit using the same card twice in a turn by pooling used card until the end of a turn, like the famous game Dominion (card game) - Wikipedia

4 Likes

Indeed. When you look at the original game rules, this is what they do. I missed it :frowning:
I’ll see how we can do it without breaking all the input/output (maybe add a PLAYED_CARDS like the HAND input)

2 Likes

Replay here

On the last frame, I’m picking a random move from the (filtered) list of possible moves given by the referee, but I’m getting disqualified because the move is not possible. However the summary suggests it is possible, as I do have a CONTINUOUS_INTEGRATION CARD in hand.

Standard Output Stream:

TASK_PRIORITIZATION 5 1

Game Summary:

Bob can play a card/perform an action
Bob has in hand: TECHNICAL_DEBT (9), TECHNICAL_DEBT (9), CONTINUOUS_INTEGRATION (5), BONUS (8), BONUS (8), ARCHITECTURE_STUDY (4), TASK_PRIORITIZATION (3), CODE_REVIEW (6)
Bob provided incorrect input. you do not have a card of type CONTINUOUS_INTEGRATION to deprioritize
Bob was disqualified.

@Bob2 this is fixed in the PR supplied higher up in the Thread:

1 Like

So I should not be getting the issue right now, or has that PR not been deployed yet?

Not deployed yet. They are looking to fix multiple issues in the same update afaik.

1 Like