-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Giving the AI good trades is stored as credit #11326
base: master
Are you sure you want to change the base?
Conversation
I'm fine with gifts, but this should only be if you're giving them something for free. This is also why we don't have a "what would it take" button - I am fundamentally opposed, since that allows you to game the AI to give them not one gold more than the bare minimum. |
The problem with that is that the AI doesn't negotiate in a very human-like manner (There is almost no way that it can act human-like in all situations). The AI is never desperate and can't understand when a trade that is usually slightly bad is actually really good. I lost where the post was (maybe on Discord), but someone said along the lines of, "Why should I trade with the AI if it always gives me a bad trade?" and this is one way to counteract that. It might be better to make it percent-based. When a trade is accepted with both sides offering something, we take only X% of the extra value of one side to store as a gift. Also, I forgot to mention, we might be able to have gifting units increase this gift value so that players can trade units for gold to the AI. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Would something like reducing the gift value by 130% of the value from the non-gift side work? This would still allow the case where you want to give a lot of money for very little in return but for the AI to still understand that it is a gift. While still allowing the for the haggling loss. For example, a trades with b. |
Ooops, that was an accident |
Trouble with undelete branch and reopen? |
I am not sure how to undelete a batch-delete operation. The changes can still be seen in the files changed luckily. |
No idea what a batch-delete is in this context. When I see "deleted the whatever branch whenever" I always also see a github offer to undelete... And I only delete local after seeing that button and seeing a fetch notices the tracked online branch is gone. 🤷 |
But come to think of it, I manage to lose (not loose) source text too from time to time- worst is when I forget a Studio bug: "Create patch" from its git log display commit list often creates patches that have the name of the selected commit, but the diff from another. And I prefer deconstructing a commit chain via "out of git" storage to complicated rebases... |
Wait, no I didn't! I only deleted the remote branch! |
# Conflicts: # core/src/com/unciv/logic/trade/TradeLogic.kt
Conflicts have been resolved. |
Alrighty, so there are two ways to preserve haggling and also allow for gifts in the same trade.
Note that gold gifts do deteriorate over time. |
While trading with the AI, I am not always sure how much gold they want for each item. In order to trade for an item I have to give the AI more gold than it is actually worth or else the trade will take forever to get through.
This PR works on improving that by adding in "gift" relations. Anytime a civ gives the AI a good trade, the excess gold value will be stored as the "We appreciate your gifts" modifier. This gift is then used as credit for a future trade with the AI.
Picture
After giving Babylon some gold, they now have the credit stored and will be willing to give some of it back in trades.Also, more tests, these might be the first tests to include trading in them. I couldn't find any tests covering trades.