├── data ├── split │ ├── README.md │ └── casino_valid.json └── README.md ├── strategy_prediction ├── README.md ├── arguments.py ├── data.py ├── main.py └── model.py ├── README.md ├── .gitignore └── LICENSE /data/split/README.md: -------------------------------------------------------------------------------- 1 | We provide one random split of casino.json into train (900 dialogues), valid (30 dialogues), and test (100 dialogues). 2 | -------------------------------------------------------------------------------- /strategy_prediction/README.md: -------------------------------------------------------------------------------- 1 | This directory contains our code for the multi-tasking framework for strategy prediction from a given utterance. Please refer to the paper for more details. 2 | 3 | # File Descriptions 4 | **main.py**: main driver code\ 5 | **arguments.py**: All the hyperparameters and i/o arguments -> controlled from main.py\ 6 | **data.py**: handles the dataloaders\ 7 | **model.py**: handles the model architecture, training, and evaluation 8 | 9 | # Notes 10 | 11 | * Path names in CAMEL_CASE format must be replaced by proper paths before running the code. 12 | * At this point, the code assumes a specific input format that may not directly map to the provided dataset files in this repository. Till this is fixed, the code would need a little more work depending on the desired input data. The hope is that the code is still useful in quickly setting up a multi-task learning framework for CaSiNo or any other similar task. 13 | * If you face any issues, please feel free to get in touch. 14 | -------------------------------------------------------------------------------- /data/README.md: -------------------------------------------------------------------------------- 1 | 2 | This directory contains the CaSiNo dataset along with the associated strategy annotations. 3 | 4 | # Descriptions 5 | 6 | **casino.json**: The complete set of 1030 dialogues in the CaSiNo dataset, containing the conversations, participant information, and strategy annotations, wherever available.\ 7 | **split**: Contains one random split of casino.json into train/valid/test. 8 | 9 | # Format for the outcome variables 10 | 11 | *points_scored* 12 | * Points gained for one single item are based on these rules - every high item: 5 , every medium item: 4, every low item: 3 13 | * Final points can be computed by simply summing up the points for all the items that the participant is able to negotiate for, as per the final agreed deal. 14 | * If someone walks away, the final points are equal to 5 (equivalent of one high item), for both the participants. 15 | 16 | *satisfaction (How satisfied are you with the negotiation outcome?)* 17 | * 5 possible values (Extremely dissatisfied, Slightly dissatisfied, Undecided, Slightly satisfied, Extremely satisfied) 18 | * For the analysis in the paper, these were encoded on a scale from 1 to 5 (with increasing satisfaction) 19 | 20 | *opponent_likeness (How much do you like your opponent?)* 21 | * 5 possible values (Extremely dislike, Slightly dislike, Undecided, Slightly like, Extremely like) 22 | * For the analysis in the paper, these were encoded on a scale from 1 to 5 (with increasing likeness) 23 | 24 | # Notes 25 | 26 | For more information, please refer to the original dataset paper published at NAACL 2021 (https://aclanthology.org/2021.naacl-main.254.pdf). 27 | 28 | You can also reach out to us at kchawla@usc.edu (Kushal Chawla). 29 | -------------------------------------------------------------------------------- /strategy_prediction/arguments.py: -------------------------------------------------------------------------------- 1 | """ 2 | Class to parse and validate command-line arguments required by train, classify and evaluate. 3 | """ 4 | class ArgumentHandler: 5 | 6 | def __init__(self): 7 | 8 | #I/O 9 | 10 | #data.py: DataHandler 11 | self.logdir = None 12 | 13 | self.max_tokens = 200 14 | self.labels = "" 15 | self.num_labels = 3 16 | self.feature_input_dims = self.num_labels + 1 #turn no + context bow 17 | self.context_size = 3 18 | 19 | #model.py: Net 20 | self.text_encoder = True 21 | self.text_encoder_dims = 768 22 | self.text_output_dims = 64 23 | self.bert = True 24 | 25 | self.feature_encoder = False 26 | self.feature_encoder_dims = 64 27 | 28 | self.dropout = 0.1 29 | self.activation = 'relu' 30 | 31 | #model.py: ModelHandler 32 | self.batch_size = 8 33 | self.load_from_ckpt = False 34 | self.ckpt_file = None #"best_ckpt.pt" 35 | 36 | self.learning_rate = 2e-5 37 | self.weight_decay = 0.01 38 | self.max_grad_norm = 1.0 39 | 40 | self.num_epochs = 500 #only using num_iters, essentially. 41 | self.num_iters=100 42 | self.print_iter_no_after = 25#print iter number after. 43 | self.ckpt_after = 50 44 | 45 | self.freeze = False 46 | 47 | self.oversample = False 48 | self.have_attn = True 49 | 50 | self.pretraining = False 51 | self.pretrained_dir = "" 52 | 53 | self.store_preds = False 54 | 55 | self.majority_prediction = False 56 | 57 | def update_hyps(self, hyps): 58 | """ 59 | Update the params 60 | """ 61 | for key, value in hyps.items(): 62 | setattr(self, key, value) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CaSiNo 2 | 3 | This repository contains the dataset and the PyTorch code for **'CaSiNo: A Corpus of Campsite Negotiation Dialogues for Automatic Negotiation Systems'**. 4 | 5 | We provide a novel dataset (referred to as CaSiNo) of 1030 negotiation dialogues. Two participants take the role of campsite neighbors and negotiate for *Food*, *Water*, and *Firewood* packages, based on their individual preferences and requirements. This design keeps the task tractable, while still facilitating linguistically rich and personal conversations. 6 | 7 | # Repository Structure 8 | 9 | **data**: The complete CaSiNo dataset along with the strategy annotations.\ 10 | **strategy_prediction**: Code for strategy prediction in a multi-task learning setup. 11 | 12 | # Each Dialogue in the Dataset 13 | 14 | **Participant Info** 15 | * Demographics (Age, Gender, Ethnicity, Education) 16 | * Personality attributes (SVO and Big-5) 17 | * Preference order 18 | * Arguments for needing or not needing a specific item 19 | 20 | **Negotiation Dialogue** 21 | * Alternating conversation between two participants 22 | * 11.6 utterances on average 23 | * Includes the use of four emoticons: Joy, Sadness, Anger, Surprise 24 | 25 | **Negotiation Outcomes** 26 | * Points scored 27 | * Satisfaction (How satisfied are you with the negotiation outcome?) 28 | * Opponent Likeness (How much do you like your opponent?) 29 | 30 | **Strategy Annotations** 31 | * Utterance-level annotations for various negotiation strategies used by the participants 32 | * Available for 396 dialogues (4615 utterances) 33 | 34 | # References 35 | 36 | If you use data or code in this repository, please cite our paper: 37 | ``` 38 | @inproceedings{chawla2021casino, 39 | title={CaSiNo: A Corpus of Campsite Negotiation Dialogues for Automatic Negotiation Systems}, 40 | author={Chawla, Kushal and Ramirez, Jaysa and Clever, Rene and Lucas, Gale and May, Jonathan and Gratch, Jonathan}, 41 | booktitle={Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies}, 42 | pages={3167--3185}, 43 | year={2021} 44 | } 45 | ``` 46 | 47 | # LICENSE 48 | 49 | Please refer to the LICENSE file in the root directory for more details. 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /strategy_prediction/data.py: -------------------------------------------------------------------------------- 1 | #imports 2 | import numpy as np 3 | import torch 4 | from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler 5 | from transformers import BertTokenizer, RobertaTokenizer 6 | import json 7 | import re 8 | import pandas as pd 9 | import os 10 | 11 | 12 | # Code from https://www.tensorflow.org/tutorials/text/transformer 13 | def get_angles(pos, i, d_model): 14 | angle_rates = 1 / np.power(10000, (2 * (i//2)) / np.float32(d_model)) 15 | return pos * angle_rates 16 | 17 | def positional_encoding(position, d_model): 18 | angle_rads = get_angles(np.arange(position)[:, np.newaxis], 19 | np.arange(d_model)[np.newaxis, :], 20 | d_model) 21 | 22 | # apply sin to even indices in the array; 2i 23 | angle_rads[:, 0::2] = np.sin(angle_rads[:, 0::2]) 24 | 25 | # apply cos to odd indices in the array; 2i+1 26 | angle_rads[:, 1::2] = np.cos(angle_rads[:, 1::2]) 27 | 28 | pos_encoding = angle_rads[np.newaxis, ...] 29 | 30 | return pos_encoding 31 | 32 | class StandardScalar: 33 | def __init__(self): 34 | """ 35 | Can be updated by calling the fit functionality with train data. 36 | """ 37 | self.means = [] 38 | self.stds = [] 39 | 40 | def fit(self, x=[], means=[], stds=[]): 41 | """ 42 | x : list of list num_data X num_feats 43 | #compute means and stds from x OR use supplied values. 44 | """ 45 | if(len(means) and len(stds)): 46 | self.means = means 47 | self.stds = stds 48 | else: 49 | assert len(x) > 0 50 | x = np.array(x) 51 | #print(x.shape) 52 | self.means = np.array([np.mean(x[:,i]) for i in range(x.shape[1])]) #i: every feature 53 | self.stds = np.array([np.std(x[:,i]) for i in range(x.shape[1])]) #i: every feature 54 | #print("Means, stds: ", self.means, self.stds) 55 | 56 | def transform(self, x): 57 | """ 58 | standaridize x with mean 0 and std 1 59 | """ 60 | assert len(self.means)*len(self.stds) > 0 61 | 62 | return np.array(x).astype(np.float32) # do not scale. 63 | #return ((np.array(x) - self.means)/self.stds).astype(np.float32) 64 | 65 | """ 66 | Class to handle all stages before model training: data pre-processing + feature engineering. 67 | """ 68 | class DataHandler: 69 | 70 | def __init__(self, args, logger): 71 | """ 72 | Initiating Data Handler object. 73 | """ 74 | self.args = args 75 | self.logger = logger 76 | self.scalar = StandardScalar() 77 | self.pos_matrix = positional_encoding(100, 32)[0].tolist() # 100 tokens , 32 dimensions. 78 | 79 | #update args from checkpoint, if asked to. 80 | if(self.args.load_from_ckpt): 81 | 82 | store_logdir = self.args.logdir 83 | ckptfile = os.path.join(self.args.logdir, self.args.ckpt_file) 84 | print("Loading arguments and scalar values from checkpoint file: ", ckptfile, file=self.logger) 85 | ckpt = torch.load(ckptfile) 86 | self.args.update_hyps(ckpt["args"]) 87 | 88 | self.args.load_from_ckpt = True 89 | self.args.logdir = store_logdir 90 | #update scalar. 91 | self.scalar.fit(means = ckpt["means"], stds = ckpt["stds"]) 92 | print("Loaded args: ", vars(self.args), file=self.logger) 93 | 94 | if(self.args.bert): 95 | 96 | if(self.args.pretraining): 97 | assert self.args.pretrained_dir 98 | self.tokenizer = BertTokenizer.from_pretrained(self.args.pretrained_dir) 99 | else: 100 | self.tokenizer = BertTokenizer.from_pretrained(PATH_TO_MODIFIED_INPUT_DIR) 101 | 102 | def get_label_rep(self, label_string): 103 | 104 | labels = self.args.labels 105 | 106 | assert self.args.num_labels == len(labels) 107 | found = set(label_string.split(',')) 108 | label_rep = [0 for _ in range(len(labels))] 109 | 110 | for i, label in enumerate(labels): 111 | if(label in found): 112 | label_rep[i]= 1 113 | 114 | return label_rep 115 | 116 | def get_initial_io(self, all_data, train=False): 117 | """ 118 | x: (context, sentence, feats) 119 | feats can be (turn embedding, bow of context annotations) 120 | y: (basically list of list of trues, given a sequence of labels) 121 | """ 122 | initial_io = { 123 | 124 | 'context': [], 125 | 'utterance': [], 126 | 'feat': [], 127 | 'y': [] 128 | } 129 | 130 | for dialogue in all_data: 131 | for i, item in enumerate(dialogue): 132 | 133 | utterance = item[0] 134 | 135 | context_items = dialogue[max(i-self.args.context_size, 0): i] 136 | 137 | context = [ii[0] for ii in context_items] 138 | this_context = context[:] 139 | 140 | this_utterance = utterance 141 | 142 | #features 143 | features = self.pos_matrix[i][:] #[i] #turn number 144 | assert len(features) == 32, len(features) 145 | context_bow = [self.get_label_rep(ii[1]) for ii in context_items] 146 | merged_bow = [0 for _ in range(self.args.num_labels)] 147 | for bow in context_bow: 148 | for ix in range(self.args.num_labels): 149 | merged_bow[ix] += bow[ix] 150 | #features += merged_bow #annotations of the context 151 | this_features = features[:] 152 | 153 | #y 154 | this_y = self.get_label_rep(item[1])[:] 155 | 156 | #add to the array 157 | initial_io['context'].append(this_context[:]) 158 | initial_io['utterance'].append(this_utterance) 159 | initial_io['feat'].append(this_features[:]) 160 | initial_io['y'].append(this_y[:]) 161 | 162 | if(self.args.oversample and train): 163 | #do over sampling for minority class: this_y[3]==1 or this_y[5]==1 164 | if(sum(this_y) >= 1): 165 | #atleast one positive sample 166 | #add to the array 167 | initial_io['context'].append(this_context[:]) 168 | initial_io['utterance'].append(this_utterance) 169 | initial_io['feat'].append(this_features[:]) 170 | initial_io['y'].append(this_y[:]) 171 | 172 | return initial_io 173 | 174 | def get_tokens(self, cxt, utt): 175 | """ 176 | sent = "[CLS] " + " ".join(cxt) + "[SEP] " + utt + "[SEP]" 177 | tokens = self.tokenizer.tokenize(sent) 178 | 179 | if(len(tokens) >= self.args.max_tokens): 180 | tokens = tokens[:self.args.max_tokens] 181 | else: 182 | tokens = tokens + ['[PAD]' for _ in range(self.args.max_tokens-len(tokens))] 183 | """ 184 | def get_num_toks(all_toks): 185 | summ = 0 186 | for item in all_toks: 187 | summ += len(item) 188 | return summ 189 | 190 | all_toks = [self.tokenizer.tokenize(sent) for sent in cxt] + [self.tokenizer.tokenize(utt)] 191 | 192 | count = get_num_toks(all_toks) 193 | rem = count - (self.args.max_tokens - 20) 194 | 195 | for i in range(len(all_toks)): 196 | if(rem <= 0): 197 | break 198 | length = len(all_toks[i]) 199 | if(length >= rem): 200 | all_toks[i] = all_toks[i][rem:] 201 | rem = 0 202 | else: 203 | all_toks[i] = [] 204 | rem -= length 205 | 206 | if(len(all_toks) < (self.args.context_size + 1)): 207 | missing = (self.args.context_size + 1) - len(all_toks) 208 | all_toks = [[] for _ in range(missing)] + all_toks 209 | 210 | final_tokens = ['[CLS]'] 211 | for item in all_toks[:-1]: 212 | final_tokens += item 213 | final_tokens.append('') #ADD TOKEN TO VOCABULARY. 214 | 215 | final_tokens.append('[SEP]') 216 | 217 | final_tokens += all_toks[-1] 218 | final_tokens.append('[SEP]') 219 | 220 | if(len(final_tokens) >= self.args.max_tokens): 221 | final_tokens = final_tokens[:self.args.max_tokens] 222 | else: 223 | final_tokens = final_tokens + ['[PAD]' for _ in range(self.args.max_tokens-len(final_tokens))] 224 | 225 | assert len(final_tokens) == self.args.max_tokens 226 | return final_tokens 227 | 228 | def make_ready_for_input(self, all_data, fit_scalar): 229 | """ 230 | x: x_input_ids, x_input_type_ids, x_input_mask, x_input_feats 231 | y: y 232 | """ 233 | input_ready = { 234 | "x_input_ids": [], 235 | "x_input_type_ids": [], 236 | "x_input_mask": [], 237 | "x_input_feats": [], 238 | "y": [] 239 | } 240 | #features 241 | if(fit_scalar): 242 | self.scalar.fit(x=all_data["feat"]) 243 | input_ready['x_input_feats'] = self.scalar.transform(all_data["feat"]) 244 | 245 | ix = 0 246 | #other inputs 247 | for cxt, utt in zip(all_data["context"], all_data["utterance"]): 248 | tokens = self.get_tokens(cxt, utt) 249 | if(ix == 1): 250 | #random printing 251 | print(tokens, file=self.logger) 252 | ix += 1 253 | 254 | ids = self.tokenizer.convert_tokens_to_ids(tokens) 255 | 256 | x_input_type_ids = [] 257 | x_input_mask = [] 258 | 259 | type_cur = 0 260 | for tok in tokens: 261 | 262 | x_input_type_ids.append(type_cur) 263 | if(tok == '[SEP]'): 264 | type_cur = 1 265 | 266 | if(tok == '[PAD]'): 267 | x_input_mask.append(0) 268 | else: 269 | x_input_mask.append(1) 270 | input_ready["x_input_ids"].append(ids) 271 | input_ready["x_input_type_ids"].append(x_input_type_ids) 272 | input_ready["x_input_mask"].append(x_input_mask) 273 | 274 | #y 275 | input_ready["y"] = all_data["y"] 276 | 277 | print(input_ready["x_input_ids"][1], 278 | input_ready["x_input_type_ids"][1], 279 | input_ready["x_input_mask"][1], 280 | input_ready["x_input_feats"][1], 281 | input_ready["y"][1], 282 | file=self.logger) 283 | 284 | return input_ready 285 | 286 | def make_tensors(self, all_data): 287 | 288 | all_data["x_input_ids"] = torch.tensor(all_data["x_input_ids"], dtype=torch.long) 289 | all_data["x_input_type_ids"] = torch.tensor(all_data["x_input_type_ids"], dtype=torch.long) 290 | all_data["x_input_mask"] = torch.tensor(all_data["x_input_mask"], dtype=torch.long) 291 | all_data["x_input_feats"] = torch.tensor(all_data["x_input_feats"]) 292 | all_data["y"] = torch.tensor(all_data["y"], dtype=torch.float32) 293 | 294 | return all_data 295 | 296 | def get_dataloader(self, all_data, fit_scalar=False, use_random_sampler=True, train=False): 297 | """ 298 | Data format: 299 | Basic format of input all_data is dialogue with (, separated) annotation labels: go from there. 300 | """ 301 | 302 | """ 303 | x: (context, utterance, feats) 304 | feats can be (turn embedding, bow of context annotations) 305 | y: (basically list of list of trues, given a sequence of labels) 306 | """ 307 | all_data = self.get_initial_io(all_data, train=train) 308 | 309 | """ 310 | x: x_input_ids, x_input_type_ids, x_input_mask, x_input_feats 311 | y: y 312 | """ 313 | all_data = self.make_ready_for_input(all_data, fit_scalar) 314 | 315 | """ 316 | convert stuff to tensors 317 | """ 318 | all_data = self.make_tensors(all_data) 319 | 320 | # Create an iterator of our data with torch DataLoader. This helps save on memory during training because, unlike a for loop, 321 | # with an iterator the entire dataset does not need to be loaded into memory 322 | data = TensorDataset(all_data["x_input_ids"], all_data["x_input_type_ids"], all_data["x_input_mask"], all_data["x_input_feats"], all_data["y"]) 323 | 324 | if(use_random_sampler): 325 | sampler = RandomSampler(data) 326 | else: 327 | sampler = SequentialSampler(data) 328 | 329 | dataloader = DataLoader(data, sampler=sampler, batch_size=self.args.batch_size) 330 | 331 | return dataloader -------------------------------------------------------------------------------- /strategy_prediction/main.py: -------------------------------------------------------------------------------- 1 | import os, sys 2 | import random 3 | import torch 4 | import json 5 | import pandas as pd 6 | from matplotlib.pylab import plt 7 | from sklearn.model_selection import KFold 8 | 9 | from arguments import ArgumentHandler 10 | from data import DataHandler 11 | from model import ModelHandler 12 | #from torch.utils.tensorboard import SummaryWriter 13 | #from pytorch_model_summary import summary 14 | 15 | """ 16 | For every hyp combination: 17 | For every cv split 18 | Basically: lets do this, restrict this to just one round of CV, somehow. 19 | """ 20 | 21 | def select_hyps(hyp_search): 22 | exceptions = set(['labels']) 23 | this_hyp = {} 24 | 25 | for hyp, val in hyp_search.items(): 26 | 27 | if isinstance(val, list) and (hyp not in exceptions): 28 | this_hyp[hyp] = random.choice(val) 29 | else: 30 | this_hyp[hyp] = val 31 | 32 | return this_hyp 33 | 34 | def get_dialogs_from_file(fname): 35 | 36 | extra_utterances = ['Submit-Deal', 'Accept-Deal', 'Reject-Deal', 'Walk-Away', 'Submit-Post-Survey'] 37 | 38 | df = pd.read_csv(fname) 39 | dat = pd.DataFrame.to_dict(df, orient="records") 40 | 41 | all_data = [] 42 | 43 | cur_dialog = [] 44 | cur_id = -1 45 | 46 | for i, item in enumerate(dat): 47 | 48 | if((item["DialogueId"] != item["DialogueId"]) or (item["Utterance"] in extra_utterances)): 49 | continue 50 | 51 | #valid item 52 | this_id = item["DialogueId"] 53 | if((this_id != cur_id) and cur_dialog): 54 | #found new id 55 | new_dialog = cur_dialog[:] 56 | all_data.append(new_dialog) 57 | cur_dialog = [] 58 | 59 | if(isinstance(item["Labels"], str)): 60 | assert isinstance(item["Labels"], str) and len(item["Labels"])>0, i 61 | this_item = [item["Utterance"], item["Labels"]] 62 | cur_dialog.append(this_item) 63 | cur_id = this_id 64 | 65 | if(cur_dialog): 66 | new_dialog = cur_dialog[:] 67 | all_data.append(new_dialog) 68 | cur_dialog = [] 69 | 70 | return all_data 71 | 72 | def get_all_data(input_files): 73 | """ 74 | list of dialogues with annotations. 75 | """ 76 | all_data = [] 77 | 78 | for input_file in input_files: 79 | all_data += get_dialogs_from_file(input_file) 80 | 81 | return all_data 82 | 83 | def get_all_data_dummy(): 84 | """ 85 | simple list of dialogues with annotations. To illustrate the expected input format. 86 | """ 87 | """ 88 | #DUMMY FOR NOW 89 | all_data = [ 90 | 91 | [ 92 | ["Hello! Let's work together on a deal for these packages, shall we? What are you most interested in?", 93 | "Promote-coordination,Preference-elicitation"], 94 | ["Hey! I'd like some more firewood to keep my doggo warm. What do you need?", 95 | "Required-other,Preference-elicitation"], 96 | ], 97 | [ 98 | ["Hello! Let's work together on a deal for these packages, shall we? What are you most interested in?", 99 | "Promote-coordination,Preference-elicitation"], 100 | ["Hey! I'd like some more firewood to keep my doggo warm. What do you need?", 101 | "Required-other,Preference-elicitation"], 102 | ], 103 | ] 104 | 105 | all_data = all_data*100 106 | 107 | return all_data 108 | """ 109 | pass 110 | 111 | def get_cv_generator(all_data, num_folds): 112 | kf = KFold(n_splits=num_folds) 113 | train_ratio = 0.95 114 | X = [[0] for _ in range(len(all_data))] 115 | for train_index, test_index in kf.split(X): 116 | train_dev_data = [all_data[ii] for ii in train_index] 117 | test_data = [all_data[ii] for ii in test_index] 118 | ll = len(train_dev_data) 119 | train_data, dev_data = train_dev_data[:int(ll*train_ratio)], train_dev_data[int(ll*train_ratio):] 120 | yield (train_data, dev_data, test_data) 121 | 122 | def write_graph(net, device, dataloader): 123 | inputs = None 124 | for batch in dataloader: 125 | # Add batch to GPU 126 | batch = tuple(t.to(device) for t in batch) 127 | x_input_ids, x_input_type_ids, x_input_mask, x_input_feats, _ = batch 128 | inputs = (x_input_ids, x_input_type_ids, x_input_mask, x_input_feats) 129 | break 130 | 131 | board_dir = BOARD_DIR 132 | writer = SummaryWriter(board_dir) 133 | writer.add_graph(net, inputs) 134 | writer.close() 135 | print("GRAPH WRITTEN FOR TENSORBOARD AT: ", board_dir, file=logger) 136 | 137 | def show_summary_func(net, device, dataloader): 138 | x_input_ids, x_input_type_ids, x_input_mask, x_input_feats = None, None, None, None 139 | for batch in dataloader: 140 | # Add batch to GPU 141 | batch = tuple(t.to(device) for t in batch) 142 | x_input_ids, x_input_type_ids, x_input_mask, x_input_feats, _ = batch 143 | break 144 | 145 | print(summary(net, x_input_ids, x_input_type_ids, x_input_mask, x_input_feats, show_input=True), file=logger) 146 | 147 | def train_and_eval(cv_data, hyps, logger, show_summary=False): 148 | train_data, val_data, test_data = cv_data[0], cv_data[1], cv_data[2] 149 | 150 | #arguments 151 | args = ArgumentHandler() 152 | args.update_hyps(hyps) 153 | 154 | #flush the output 155 | logger.flush() 156 | 157 | #data 158 | data = DataHandler(args=args, logger=logger) 159 | data.train_dataloader = data.get_dataloader(train_data, fit_scalar=True, train=True) 160 | data.dev_dataloader = data.get_dataloader(val_data) 161 | data.test_dataloader = data.get_dataloader(test_data) 162 | 163 | #flush the output 164 | logger.flush() 165 | 166 | #modelling 167 | model = ModelHandler(data=data, args=args, logger=logger) 168 | 169 | if(show_summary): 170 | show_summary_func(model.model, model.device, data.train_dataloader) 171 | 172 | best_dev_f1, best_ckpt, summary = model.train_model() 173 | 174 | #now evaluate on the best_ckpt 175 | model.load_model_from_ckpt(best_ckpt)#load_best_ckpt basically. 176 | #get results 177 | train_results = model.evaluate_model("train", sample_size=-1) 178 | dev_results = model.evaluate_model("dev", sample_size=-1) 179 | test_results = model.evaluate_model("test", sample_size=-1) 180 | 181 | #build output dict for this run: 182 | output = {} 183 | 184 | output["model"] = best_ckpt 185 | output["results"] = { 186 | "train": train_results, 187 | "dev": dev_results, 188 | "test": test_results, 189 | } 190 | output["training"] = { 191 | "ckpt_level_summary": summary, 192 | "best_dev_f1": best_dev_f1 193 | } 194 | 195 | del args 196 | del data 197 | del model 198 | 199 | return output 200 | 201 | def get_cv_mean_f1_on_val(cv_results): 202 | 203 | sum_f1 = 0.0 204 | for item in cv_results: 205 | sum_f1 += item["dev"]["mean_positive_f1"] 206 | 207 | return sum_f1/len(cv_results) 208 | 209 | def merge_cv_results(cv_results): 210 | """ 211 | Means across CV 212 | """ 213 | dtypes = ["train", "dev", "test"] 214 | props_l1 = ["mean_loss", "mean_accuracy", "mean_positive_f1", "UL-A", "Joint-A"] 215 | props_l2 = ["accuracy", "positive_f1"] 216 | 217 | merged_results = {} 218 | 219 | for dtype in dtypes: 220 | merged_results[dtype] = {} 221 | for prop in props_l1: 222 | summ = 0.0 223 | for item in cv_results: 224 | summ += item[dtype][prop] 225 | merged_results[dtype][prop] = summ/len(cv_results) 226 | 227 | num_labels = len(cv_results[0][dtype]["label_wise"]) 228 | merged_results[dtype]["label_wise"] = [{} for _ in range(num_labels)] 229 | for i in range(num_labels): 230 | for prop in props_l2: 231 | summ = 0.0 232 | for item in cv_results: 233 | summ += item[dtype]["label_wise"][i][prop] 234 | merged_results[dtype]["label_wise"][i][prop] = summ/len(cv_results) 235 | 236 | return merged_results 237 | 238 | def save_everything(all_cv_outputs, ckptfile, cv_wise_file, hyp_wise_file): 239 | """ 240 | models and results for the cvs, individually and aggregate data. 241 | """ 242 | #models 243 | models = all_cv_outputs["models"] 244 | torch.save(models, ckptfile) 245 | 246 | #cv wise 247 | cv_wise = { 248 | "results": all_cv_outputs["results"], 249 | "training": all_cv_outputs["training"], 250 | } 251 | with open(cv_wise_file, 'w') as fp: 252 | json.dump(cv_wise, fp) 253 | 254 | #hyp level 255 | hyp_wise = { 256 | "hyps": all_cv_outputs["hyps"], 257 | "results": merge_cv_results(all_cv_outputs["results"]) 258 | } 259 | with open(hyp_wise_file, 'w') as fp: 260 | json.dump(hyp_wise, fp) 261 | 262 | input_files = [ 263 | PATH_TO_ANNOTATION_FILES 264 | ] 265 | 266 | all_data = get_all_data(input_files) 267 | 268 | print("Total number of dialogues in the dataset: ", len(all_data)) 269 | 270 | total_utts = 0 271 | for item in all_data: 272 | total_utts += len(item) 273 | print("Total utterances: ", total_utts) 274 | 275 | logdir = LOG_DIR 276 | if not os.path.exists(logdir): 277 | os.makedirs(logdir) 278 | 279 | ckptfile = os.path.join(logdir, "best_ckpt.pt") 280 | cv_wise_file = os.path.join(logdir, "cv_wise.json") 281 | hyp_wise_file = os.path.join(logdir, "hyp_wise.json") 282 | logger = open(os.path.join(logdir, "all_logs.txt"), "w") 283 | 284 | 285 | labels = ['Small-talk', 'Required-self', 'Required-other', 'Not-Required', 'Preference-elicitation', 286 | 'Undervalue-Other-Requirement', 'Vouching-for-fairness'] 287 | 288 | num_labels = len(labels) 289 | feature_input_dims = 32 #len(labels) + 32 #position embedding is 32. 290 | 291 | batch_size = 64 292 | ckpt_after = (4615//batch_size) 293 | num_iters = 10*ckpt_after 294 | 295 | print("batch_size, ckpt_after, num_iters: ", batch_size, ckpt_after, num_iters) 296 | 297 | hyp_search_trials = 1 298 | hyp_search = { 299 | 'logdir': logdir, 300 | 'labels': labels, 301 | 'num_labels': num_labels, 302 | 'feature_input_dims': feature_input_dims, 303 | 304 | 'text_encoder': True, 305 | 'bert': True, 306 | 'text_encoder_dims': 768, 307 | 'text_output_dims': [128], 308 | 309 | 'feature_encoder': True, 310 | 'feature_encoder_dims': [128], 311 | 312 | 'batch_size': [batch_size], 313 | 'num_iters': num_iters, 314 | 'ckpt_after': ckpt_after, 315 | 316 | 'freeze': False, 317 | 'oversample': True, 318 | 'have_attn': True, 319 | 'store_preds': False, 320 | 'majority_prediction': False, 321 | 322 | 'pretraining': False, 323 | 'pretrained_dir': PATH_TO_PRETRAINED_MODEL, 324 | 325 | 'print_iter_no_after': 25, 326 | 'activation': ['relu'], 327 | 'learning_rate': [5e-5], 328 | 'weight_decay': [0.01], 329 | 'dropout': [0.1], 330 | } 331 | 332 | best_hyps = None 333 | best_f1 = -1 #best avg f1 score for positive class for a given hyp -> avg over label set and CV split. 334 | best_outputs = None #output results for the best model configuration. 335 | all_f1 = [] #all avg f1 scores for positive classs. -> avg over label set and CV split. 336 | 337 | #CV 338 | num_cv_folds_total = 5 339 | num_cv_folds_used = 5 340 | 341 | print("SEARCH STARTING: hyp_search_trials, num_cv_folds_total, num_cv_folds_used", hyp_search_trials, num_cv_folds_total, num_cv_folds_used, file=logger) 342 | for trial in range(hyp_search_trials): 343 | print("-------------------------------------------------", file=logger) 344 | this_hyps = select_hyps(hyp_search) 345 | #get CV data generator 346 | cv_gen = get_cv_generator(all_data, num_cv_folds_total) 347 | all_cv_outputs = { 348 | "results": [], 349 | "models": [], 350 | "training": [], 351 | "hyps": this_hyps 352 | } #results+models 353 | 354 | for cv_no, cv_data in enumerate(cv_gen): 355 | if(cv_no >= num_cv_folds_used): 356 | #for testing purposes. 357 | break 358 | 359 | cv_output = train_and_eval(cv_data, this_hyps, logger) 360 | print("cv_no, mean_positive_f1 for dev: ", cv_no, cv_output["results"]["dev"]["mean_positive_f1"], file=logger) 361 | #store 362 | all_cv_outputs["results"].append(cv_output["results"]) 363 | #all_cv_outputs["models"].append(cv_output["model"])#save models 364 | all_cv_outputs["training"].append(cv_output["training"]) 365 | 366 | #flush the output 367 | logger.flush() 368 | torch.cuda.empty_cache() # PyTorch thing 369 | 370 | hyp_f1 = get_cv_mean_f1_on_val(all_cv_outputs["results"]) 371 | 372 | if(hyp_f1 > best_f1): 373 | #store the newer models instead, save hyps 374 | best_f1 = hyp_f1 375 | best_hyps = this_hyps 376 | 377 | #so we will save the models and the results, analysis, stats for those models. 378 | save_everything(all_cv_outputs, ckptfile, cv_wise_file, hyp_wise_file) 379 | print("Everything stored!!!", file=logger) 380 | print("ckptfile, cv_wise_file, hyp_wise_file", ckptfile, cv_wise_file, hyp_wise_file, file=logger) 381 | 382 | #for hyp level stats. 383 | all_f1.append(hyp_f1) 384 | print("Trial number, best_f1, hyp_f1, this_hyps: ", trial, best_f1, hyp_f1, this_hyps, file=logger) 385 | 386 | #flush the output 387 | logger.flush() 388 | 389 | torch.cuda.empty_cache() # PyTorch thing 390 | 391 | print("SEARCH FINISHED", file=logger) 392 | print("Overall best_f1, best_hyps: ", best_f1, best_hyps, file=logger) 393 | print("Distribution of val F1s for all hyps: ", file=logger) 394 | print(pd.Series(all_f1).describe(), file=logger) 395 | 396 | logger.close() 397 | 398 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | 69 | Section 1 -- Definitions. 70 | 71 | a. Adapted Material means material subject to Copyright and Similar 72 | Rights that is derived from or based upon the Licensed Material 73 | and in which the Licensed Material is translated, altered, 74 | arranged, transformed, or otherwise modified in a manner requiring 75 | permission under the Copyright and Similar Rights held by the 76 | Licensor. For purposes of this Public License, where the Licensed 77 | Material is a musical work, performance, or sound recording, 78 | Adapted Material is always produced where the Licensed Material is 79 | synched in timed relation with a moving image. 80 | 81 | b. Adapter's License means the license You apply to Your Copyright 82 | and Similar Rights in Your contributions to Adapted Material in 83 | accordance with the terms and conditions of this Public License. 84 | 85 | c. Copyright and Similar Rights means copyright and/or similar rights 86 | closely related to copyright including, without limitation, 87 | performance, broadcast, sound recording, and Sui Generis Database 88 | Rights, without regard to how the rights are labeled or 89 | categorized. For purposes of this Public License, the rights 90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 91 | Rights. 92 | 93 | d. Effective Technological Measures means those measures that, in the 94 | absence of proper authority, may not be circumvented under laws 95 | fulfilling obligations under Article 11 of the WIPO Copyright 96 | Treaty adopted on December 20, 1996, and/or similar international 97 | agreements. 98 | 99 | e. Exceptions and Limitations means fair use, fair dealing, and/or 100 | any other exception or limitation to Copyright and Similar Rights 101 | that applies to Your use of the Licensed Material. 102 | 103 | f. Licensed Material means the artistic or literary work, database, 104 | or other material to which the Licensor applied this Public 105 | License. 106 | 107 | g. Licensed Rights means the rights granted to You subject to the 108 | terms and conditions of this Public License, which are limited to 109 | all Copyright and Similar Rights that apply to Your use of the 110 | Licensed Material and that the Licensor has authority to license. 111 | 112 | h. Licensor means the individual(s) or entity(ies) granting rights 113 | under this Public License. 114 | 115 | i. Share means to provide material to the public by any means or 116 | process that requires permission under the Licensed Rights, such 117 | as reproduction, public display, public performance, distribution, 118 | dissemination, communication, or importation, and to make material 119 | available to the public including in ways that members of the 120 | public may access the material from a place and at a time 121 | individually chosen by them. 122 | 123 | j. Sui Generis Database Rights means rights other than copyright 124 | resulting from Directive 96/9/EC of the European Parliament and of 125 | the Council of 11 March 1996 on the legal protection of databases, 126 | as amended and/or succeeded, as well as other essentially 127 | equivalent rights anywhere in the world. 128 | 129 | k. You means the individual or entity exercising the Licensed Rights 130 | under this Public License. Your has a corresponding meaning. 131 | 132 | 133 | Section 2 -- Scope. 134 | 135 | a. License grant. 136 | 137 | 1. Subject to the terms and conditions of this Public License, 138 | the Licensor hereby grants You a worldwide, royalty-free, 139 | non-sublicensable, non-exclusive, irrevocable license to 140 | exercise the Licensed Rights in the Licensed Material to: 141 | 142 | a. reproduce and Share the Licensed Material, in whole or 143 | in part; and 144 | 145 | b. produce, reproduce, and Share Adapted Material. 146 | 147 | 2. Exceptions and Limitations. For the avoidance of doubt, where 148 | Exceptions and Limitations apply to Your use, this Public 149 | License does not apply, and You do not need to comply with 150 | its terms and conditions. 151 | 152 | 3. Term. The term of this Public License is specified in Section 153 | 6(a). 154 | 155 | 4. Media and formats; technical modifications allowed. The 156 | Licensor authorizes You to exercise the Licensed Rights in 157 | all media and formats whether now known or hereafter created, 158 | and to make technical modifications necessary to do so. The 159 | Licensor waives and/or agrees not to assert any right or 160 | authority to forbid You from making technical modifications 161 | necessary to exercise the Licensed Rights, including 162 | technical modifications necessary to circumvent Effective 163 | Technological Measures. For purposes of this Public License, 164 | simply making modifications authorized by this Section 2(a) 165 | (4) never produces Adapted Material. 166 | 167 | 5. Downstream recipients. 168 | 169 | a. Offer from the Licensor -- Licensed Material. Every 170 | recipient of the Licensed Material automatically 171 | receives an offer from the Licensor to exercise the 172 | Licensed Rights under the terms and conditions of this 173 | Public License. 174 | 175 | b. No downstream restrictions. You may not offer or impose 176 | any additional or different terms or conditions on, or 177 | apply any Effective Technological Measures to, the 178 | Licensed Material if doing so restricts exercise of the 179 | Licensed Rights by any recipient of the Licensed 180 | Material. 181 | 182 | 6. No endorsement. Nothing in this Public License constitutes or 183 | may be construed as permission to assert or imply that You 184 | are, or that Your use of the Licensed Material is, connected 185 | with, or sponsored, endorsed, or granted official status by, 186 | the Licensor or others designated to receive attribution as 187 | provided in Section 3(a)(1)(A)(i). 188 | 189 | b. Other rights. 190 | 191 | 1. Moral rights, such as the right of integrity, are not 192 | licensed under this Public License, nor are publicity, 193 | privacy, and/or other similar personality rights; however, to 194 | the extent possible, the Licensor waives and/or agrees not to 195 | assert any such rights held by the Licensor to the limited 196 | extent necessary to allow You to exercise the Licensed 197 | Rights, but not otherwise. 198 | 199 | 2. Patent and trademark rights are not licensed under this 200 | Public License. 201 | 202 | 3. To the extent possible, the Licensor waives any right to 203 | collect royalties from You for the exercise of the Licensed 204 | Rights, whether directly or through a collecting society 205 | under any voluntary or waivable statutory or compulsory 206 | licensing scheme. In all other cases the Licensor expressly 207 | reserves any right to collect such royalties. 208 | 209 | 210 | Section 3 -- License Conditions. 211 | 212 | Your exercise of the Licensed Rights is expressly made subject to the 213 | following conditions. 214 | 215 | a. Attribution. 216 | 217 | 1. If You Share the Licensed Material (including in modified 218 | form), You must: 219 | 220 | a. retain the following if it is supplied by the Licensor 221 | with the Licensed Material: 222 | 223 | i. identification of the creator(s) of the Licensed 224 | Material and any others designated to receive 225 | attribution, in any reasonable manner requested by 226 | the Licensor (including by pseudonym if 227 | designated); 228 | 229 | ii. a copyright notice; 230 | 231 | iii. a notice that refers to this Public License; 232 | 233 | iv. a notice that refers to the disclaimer of 234 | warranties; 235 | 236 | v. a URI or hyperlink to the Licensed Material to the 237 | extent reasonably practicable; 238 | 239 | b. indicate if You modified the Licensed Material and 240 | retain an indication of any previous modifications; and 241 | 242 | c. indicate the Licensed Material is licensed under this 243 | Public License, and include the text of, or the URI or 244 | hyperlink to, this Public License. 245 | 246 | 2. You may satisfy the conditions in Section 3(a)(1) in any 247 | reasonable manner based on the medium, means, and context in 248 | which You Share the Licensed Material. For example, it may be 249 | reasonable to satisfy the conditions by providing a URI or 250 | hyperlink to a resource that includes the required 251 | information. 252 | 253 | 3. If requested by the Licensor, You must remove any of the 254 | information required by Section 3(a)(1)(A) to the extent 255 | reasonably practicable. 256 | 257 | 4. If You Share Adapted Material You produce, the Adapter's 258 | License You apply must not prevent recipients of the Adapted 259 | Material from complying with this Public License. 260 | 261 | 262 | Section 4 -- Sui Generis Database Rights. 263 | 264 | Where the Licensed Rights include Sui Generis Database Rights that 265 | apply to Your use of the Licensed Material: 266 | 267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 268 | to extract, reuse, reproduce, and Share all or a substantial 269 | portion of the contents of the database; 270 | 271 | b. if You include all or a substantial portion of the database 272 | contents in a database in which You have Sui Generis Database 273 | Rights, then the database in which You have Sui Generis Database 274 | Rights (but not its individual contents) is Adapted Material; and 275 | 276 | c. You must comply with the conditions in Section 3(a) if You Share 277 | all or a substantial portion of the contents of the database. 278 | 279 | For the avoidance of doubt, this Section 4 supplements and does not 280 | replace Your obligations under this Public License where the Licensed 281 | Rights include other Copyright and Similar Rights. 282 | 283 | 284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 285 | 286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 296 | 297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 306 | 307 | c. The disclaimer of warranties and limitation of liability provided 308 | above shall be interpreted in a manner that, to the extent 309 | possible, most closely approximates an absolute disclaimer and 310 | waiver of all liability. 311 | 312 | 313 | Section 6 -- Term and Termination. 314 | 315 | a. This Public License applies for the term of the Copyright and 316 | Similar Rights licensed here. However, if You fail to comply with 317 | this Public License, then Your rights under this Public License 318 | terminate automatically. 319 | 320 | b. Where Your right to use the Licensed Material has terminated under 321 | Section 6(a), it reinstates: 322 | 323 | 1. automatically as of the date the violation is cured, provided 324 | it is cured within 30 days of Your discovery of the 325 | violation; or 326 | 327 | 2. upon express reinstatement by the Licensor. 328 | 329 | For the avoidance of doubt, this Section 6(b) does not affect any 330 | right the Licensor may have to seek remedies for Your violations 331 | of this Public License. 332 | 333 | c. For the avoidance of doubt, the Licensor may also offer the 334 | Licensed Material under separate terms or conditions or stop 335 | distributing the Licensed Material at any time; however, doing so 336 | will not terminate this Public License. 337 | 338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 339 | License. 340 | 341 | 342 | Section 7 -- Other Terms and Conditions. 343 | 344 | a. The Licensor shall not be bound by any additional or different 345 | terms or conditions communicated by You unless expressly agreed. 346 | 347 | b. Any arrangements, understandings, or agreements regarding the 348 | Licensed Material not stated herein are separate from and 349 | independent of the terms and conditions of this Public License. 350 | 351 | 352 | Section 8 -- Interpretation. 353 | 354 | a. For the avoidance of doubt, this Public License does not, and 355 | shall not be interpreted to, reduce, limit, restrict, or impose 356 | conditions on any use of the Licensed Material that could lawfully 357 | be made without permission under this Public License. 358 | 359 | b. To the extent possible, if any provision of this Public License is 360 | deemed unenforceable, it shall be automatically reformed to the 361 | minimum extent necessary to make it enforceable. If the provision 362 | cannot be reformed, it shall be severed from this Public License 363 | without affecting the enforceability of the remaining terms and 364 | conditions. 365 | 366 | c. No term or condition of this Public License will be waived and no 367 | failure to comply consented to unless expressly agreed to by the 368 | Licensor. 369 | 370 | d. Nothing in this Public License constitutes or may be interpreted 371 | as a limitation upon, or waiver of, any privileges and immunities 372 | that apply to the Licensor or You, including from the legal 373 | processes of any jurisdiction or authority. 374 | 375 | 376 | ======================================================================= 377 | 378 | Creative Commons is not a party to its public licenses. 379 | Notwithstanding, Creative Commons may elect to apply one of its public 380 | licenses to material it publishes and in those instances will be 381 | considered the “Licensor.” The text of the Creative Commons public 382 | licenses is dedicated to the public domain under the CC0 Public Domain 383 | Dedication. Except for the limited purpose of indicating that material 384 | is shared under a Creative Commons public license or as otherwise 385 | permitted by the Creative Commons policies published at 386 | creativecommons.org/policies, Creative Commons does not authorize the 387 | use of the trademark "Creative Commons" or any other trademark or logo 388 | of Creative Commons without its prior written consent including, 389 | without limitation, in connection with any unauthorized modifications 390 | to any of its public licenses or any other arrangements, 391 | understandings, or agreements concerning use of licensed material. For 392 | the avoidance of doubt, this paragraph does not form part of the public 393 | licenses. 394 | 395 | Creative Commons may be contacted at creativecommons.org. 396 | -------------------------------------------------------------------------------- /strategy_prediction/model.py: -------------------------------------------------------------------------------- 1 | #imports 2 | from transformers import AdamW, BertForSequenceClassification, BertModel, RobertaModel, BertConfig 3 | from transformers import get_linear_schedule_with_warmup 4 | from tqdm import tqdm, trange 5 | import torch 6 | import numpy as np 7 | import os 8 | import torch.nn as nn 9 | from sklearn.metrics import mean_absolute_error, max_error, accuracy_score, f1_score, classification_report 10 | import torch.optim as optim 11 | import copy 12 | 13 | from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence, pad_packed_sequence 14 | 15 | """ 16 | Core PyTorch network 17 | """ 18 | class Net(nn.Module): 19 | def __init__(self, args): 20 | """ 21 | Defining the layers in the architecture. 22 | """ 23 | super(Net, self).__init__() 24 | 25 | self.args = args 26 | self.total_num_hidden = 0 27 | 28 | if(self.args.text_encoder): 29 | #Final embedding size will be self.args.text_output_dims 30 | self.total_num_hidden += self.args.text_output_dims 31 | 32 | if(self.args.bert): 33 | if(self.args.pretraining): 34 | assert self.args.pretrained_dir 35 | self.bert_layer = BertModel.from_pretrained(self.args.pretrained_dir) 36 | print("loaded from pretrained model") 37 | else: 38 | self.bert_layer = BertModel.from_pretrained(PATH_TO_MODIFIED_INPUT_DIR) 39 | 40 | #TODO BERT tokenizer, scratch, Bi-LSTM 41 | 42 | #task-specific transformer layers 43 | self.task_trans = nn.ModuleList([self.get_task_trans_model() for _ in range(self.args.num_labels)]) 44 | 45 | #Feed-forward, activation, dropout on the output of task_trans layers. 46 | self.after_trans_fcs = nn.ModuleList([nn.Linear(self.args.text_encoder_dims, self.args.text_output_dims) for _ in range(self.args.num_labels)]) 47 | self.after_trans_dropouts = nn.ModuleList([nn.Dropout(self.args.dropout) for _ in range(self.args.num_labels)]) 48 | self.after_trans_activations = nn.ModuleList([self.get_activation_layer() for _ in range(self.args.num_labels)]) 49 | 50 | if(self.args.feature_encoder): 51 | #self.total_num_hidden += self.args.feature_encoder_dims 52 | self.feature_fc = nn.Linear(self.args.feature_input_dims, self.args.feature_encoder_dims) 53 | self.feature_activation = self.get_activation_layer() 54 | self.feature_dropout = nn.Dropout(self.args.dropout) 55 | 56 | #task-specific final layers 57 | self.task_fcs1 = nn.ModuleList([nn.Linear(self.total_num_hidden, self.total_num_hidden//2) for _ in range(self.args.num_labels)]) 58 | self.task_fcs2 = nn.ModuleList([nn.Linear(self.total_num_hidden//2, 1) for _ in range(self.args.num_labels)]) 59 | self.task_dropouts = nn.ModuleList([nn.Dropout(self.args.dropout) for _ in range(self.args.num_labels)]) 60 | self.task_activations = nn.ModuleList([self.get_activation_layer() for _ in range(self.args.num_labels)]) 61 | 62 | def get_activation_layer(self): 63 | if(self.args.activation == 'relu'): 64 | return nn.ReLU() 65 | elif(self.args.activation == 'linear'): 66 | return nn.Identity() 67 | 68 | #should not reach here 69 | raise AssertionError 70 | 71 | def get_task_trans_model(self): 72 | 73 | config = BertConfig() 74 | config.num_hidden_layers=1 75 | config.num_attention_heads=1 76 | config.hidden_size=self.args.text_encoder_dims 77 | 78 | return BertModel(config) 79 | 80 | def apply_task_trans(self, trans_model, X_bert, x_input_mask, length): 81 | X_this = trans_model(inputs_embeds=X_bert, attention_mask=x_input_mask) 82 | X_this = X_this[1] 83 | assert X_this.shape == (length, self.args.text_encoder_dims) 84 | 85 | return X_this 86 | 87 | def after_trans_layers(self, x, fc, activation, dropout, length): 88 | 89 | X_this = fc(x) 90 | X_this = activation(X_this) 91 | X_this = dropout(X_this) 92 | 93 | assert X_this.shape == (length, self.args.text_output_dims) 94 | 95 | return X_this 96 | 97 | def apply_final_layers(self, fcs1, fcs2, dropout, activation, x_input, length): 98 | 99 | assert x_input.shape == (length, self.total_num_hidden) 100 | X_this = fcs1(x_input) 101 | X_this = activation(X_this) 102 | X_this = dropout(X_this) 103 | 104 | X_this = fcs2(X_this) 105 | assert X_this.shape == (length, 1) 106 | 107 | return X_this 108 | 109 | def forward(self, x_input_ids=None, x_input_type_ids=None, x_input_mask=None, x_input_feats=None): 110 | """ 111 | Define the forward pass here. 112 | 113 | x_input_ids = (batch_size, max_tokens) 114 | x_input_type_ids = (batch_size, max_tokens) 115 | x_input_mask = (batch_size, max_tokens) 116 | """ 117 | 118 | #true batch size for this batch 119 | length = x_input_ids.shape[0] 120 | 121 | X = [] 122 | 123 | if(self.args.text_encoder): 124 | assert x_input_ids.shape == (length, self.args.max_tokens) and x_input_ids.shape == x_input_mask.shape and x_input_ids.shape == x_input_type_ids.shape 125 | 126 | if(self.args.bert): 127 | 128 | #apply bert_layer 129 | X_bert = self.bert_layer(x_input_ids, token_type_ids=x_input_type_ids, attention_mask=x_input_mask) 130 | 131 | if(self.args.have_attn): 132 | X_bert = X_bert[0] 133 | assert X_bert.shape == (length, self.args.max_tokens, self.args.text_encoder_dims) 134 | else: 135 | #no attn ...choose the CLS. 136 | X_bert = X_bert[1] 137 | assert X_bert.shape == (length, self.args.text_encoder_dims) 138 | 139 | if(self.args.have_attn): 140 | #apply task specific trans layers: only makes sense when you are encoding the text. 141 | Xis = [self.apply_task_trans(item, X_bert, x_input_mask, length) for item in self.task_trans] 142 | else: 143 | Xis = [torch.clone(X_bert) for _ in range(self.args.num_labels)] # no attn layer, that means, just the BERT CLS used multiple times.. 144 | 145 | #apply further layers. 146 | Xis = [self.after_trans_layers(x, fc, activation, dropout, length) for x, fc, activation, dropout in zip(Xis, self.after_trans_fcs, self.after_trans_activations, self.after_trans_dropouts)] 147 | X = Xis 148 | 149 | if(self.args.feature_encoder): 150 | assert x_input_feats.shape == (length, self.args.feature_input_dims) 151 | X_feature = self.feature_fc(x_input_feats) 152 | X_feature = self.feature_activation(X_feature) 153 | X_feature = self.feature_dropout(X_feature) 154 | assert X_feature.shape == (length, self.args.feature_encoder_dims) 155 | 156 | if(not len(X)): 157 | X = [torch.clone(X_feature) for _ in range(self.args.num_labels)] 158 | else: 159 | X = [(item + torch.clone(X_feature)) for item in X] #just add them, they have already been multipled by weight matrices. 160 | #X = [torch.cat((item, X_feature), dim=1) for item in X] 161 | 162 | #Finally, run fully connected layers for every task separetely. 163 | 164 | X = [self.apply_final_layers(self.task_fcs1[i], self.task_fcs2[i], self.task_dropouts[i], self.task_activations[i], X[i], length) for i in range(self.args.num_labels)] 165 | 166 | #combine the logits 167 | X = torch.cat(X, dim=1) 168 | assert X.shape == (length, self.args.num_labels) 169 | return X 170 | 171 | """ 172 | Class to handle model training/evaluations and print out corresponding stats. 173 | """ 174 | class ModelHandler: 175 | 176 | def __init__(self, data, args, logger): 177 | """ 178 | data: formatted data, after feature engineering. keys: *_x/y/feats, *:train, dev, test. 179 | args: command line arguments 180 | If the mode is eval or we are training from a checkpoint, assume that the associated arguments are already loaded up correctly. 181 | """ 182 | self.data = data 183 | self.args = args 184 | self.logger = logger 185 | 186 | #define the model graph and load any pre-trained embeddings. 187 | self.build_model() 188 | 189 | #load model from ckpt if asked for: This can either be used to train from a specific point or for evaluating a checkpoint, depending on what mode the code is running in. 190 | if(self.args.load_from_ckpt): 191 | ckptfile = os.path.join(self.args.logdir, self.args.ckpt_file) 192 | print("Loading model from checkpoint file: ", ckptfile, file=self.logger) 193 | ckpt = torch.load(ckptfile) 194 | self.model.load_state_dict(ckpt["ckpt"]) 195 | 196 | def build_model(self): 197 | """ 198 | Build the model graph and set it up for upcoming training or evaluation. 199 | """ 200 | 201 | self.model = Net(self.args) 202 | #print(self.model, file=self.logger) 203 | 204 | if(self.args.freeze): 205 | print("FREEZING", file=self.logger) 206 | print(self.model.bert_layer.parameters(), file=self.logger) 207 | for param in self.model.bert_layer.parameters(): 208 | param.requires_grad = False 209 | 210 | self.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") 211 | print(self.device, file=self.logger) 212 | self.model.to(self.device) 213 | 214 | self.optimizer = AdamW(self.model.parameters(), lr=self.args.learning_rate, weight_decay=self.args.weight_decay) 215 | self.training_loss = nn.BCEWithLogitsLoss() #multi-label classification..targets are real numbers between 0 and 1, can give a rescaling weight to each class. 216 | 217 | def train_model(self): 218 | """ 219 | train the model. 220 | return mae, ckpt and summary for best checkpoint, as per the validation performance and summary for plotting. 221 | """ 222 | 223 | #train summary for plotting, analysis. 224 | summary = { 225 | 'iter_level_train_loss': [], #stored for the batch after every iteration 226 | 'iter_level_dev_loss': [], #stored for one randomly sampled batch after every iteration 227 | 'train_loss': [], #stored for complete training set after every evaluation on train set 228 | 'dev_loss': [], #stored for complete dev set after every evaluation on validation set 229 | 'train_f1': [], #stored for complete train set after every evaluation on train set 230 | 'dev_f1': [] #stored for complete dev set after every evaluation on validation set 231 | } 232 | 233 | # Set our model to training mode (as opposed to evaluation mode) 234 | self.model.train() 235 | 236 | iter_no = 0 237 | best_f1 = -1 238 | best_ckpt = None 239 | 240 | for _ in range(self.args.num_epochs): 241 | 242 | # Train the model for one epoch 243 | for batch in self.data.train_dataloader: 244 | 245 | if(iter_no%self.args.print_iter_no_after == 0): 246 | print("iter_no: ", iter_no, file=self.logger) 247 | self.logger.flush() 248 | 249 | if((iter_no%self.args.ckpt_after == 0) and (iter_no != 0)): 250 | #evaluate on dev and update best stuff if found 251 | train_loss, train_f1 = self.evaluate_model("train", sample_size=-1, during_training=True) 252 | dev_loss, dev_f1 = self.evaluate_model("dev", sample_size=-1, during_training=True) 253 | 254 | #save summary 255 | summary["train_loss"].append(train_loss) 256 | summary["dev_loss"].append(dev_loss) 257 | summary["train_f1"].append(train_f1) 258 | summary["dev_f1"].append(dev_f1) 259 | 260 | print("iter_no, train_loss, dev_loss, train_f1, dev_f1: ", iter_no, train_loss, dev_loss, train_f1, dev_f1, file=self.logger) 261 | 262 | #check if better 263 | if(dev_f1 >= best_f1): 264 | print("Better model found. dev_f1, best_f1: ", dev_f1, best_f1, file=self.logger) 265 | best_f1 = dev_f1 266 | best_ckpt = copy.deepcopy(self.get_ckpt()) 267 | 268 | #flush the output 269 | self.logger.flush() 270 | 271 | #max iter numbers 272 | if(iter_no >= self.args.num_iters): 273 | print("Maximum iters reached, stopping.", file=self.logger) 274 | break 275 | 276 | # Add batch to GPU 277 | batch = tuple(t.to(self.device) for t in batch) 278 | x_input_ids, x_input_type_ids, x_input_mask, x_input_feats, y = batch 279 | 280 | # Clear out the gradients (by default they accumulate) 281 | self.optimizer.zero_grad() 282 | 283 | # Forward pass 284 | outs = self.model(x_input_ids, x_input_type_ids, x_input_mask, x_input_feats) 285 | assert outs.shape == y.shape 286 | loss = self.training_loss(outs, y) 287 | 288 | # Backward pass 289 | loss.backward() 290 | 291 | #grad clipping outside the optimizer since transformers update 292 | torch.nn.utils.clip_grad_norm_(self.model.parameters(), self.args.max_grad_norm) 293 | # Update parameters and take a step using the computed gradient 294 | self.optimizer.step() 295 | 296 | #save train loss on this batch 297 | summary['iter_level_train_loss'].append(loss.item()) 298 | 299 | #compute validation loss for a single random batch 300 | dev_loss_one_iter, _ = self.evaluate_model("dev", sample_size=1, during_training=True) 301 | summary['iter_level_dev_loss'].append(dev_loss_one_iter) 302 | 303 | #update iter number 304 | iter_no += 1 305 | 306 | #max iter numbers 307 | if(iter_no >= self.args.num_iters): 308 | print("Maximum iters reached, stopping.", file=self.logger) 309 | break 310 | 311 | #return stored stuff 312 | return best_f1, best_ckpt, summary 313 | 314 | def evaluate_model(self, data_type, sample_size, during_training=False): 315 | """ 316 | Evaluate the model, assuming the correct checkpoint is already loaded. 317 | Return stuff depending on the value of during_training. 318 | 319 | Basically, we need preds and trues for every class separately. 320 | Then compute 321 | mean loss, 322 | accuracy, classification report for each class....and f1 score for class=1, mean accuracy over all labels, mean f1 (for positive class) over all labels. 323 | 324 | if during_training: 325 | return loss, mean f1 for positive class 326 | else: 327 | return accuracy, classification reports, positive class f1 for each class, avg accuracy, avg f1. 328 | """ 329 | 330 | # Set our model to eval mode 331 | self.model.eval() 332 | 333 | loss_sum = 0.0 #total sum of loss. 334 | total = 0 #number of data points 335 | preds, trues = [], [] #each item is a list of num_labels. 336 | 337 | if(data_type == "train"): 338 | mydataloader = self.data.train_dataloader 339 | elif(data_type == "dev"): 340 | mydataloader = self.data.dev_dataloader 341 | else: 342 | mydataloader = self.data.test_dataloader 343 | 344 | for step, batch in enumerate(mydataloader): 345 | 346 | if((sample_size != -1) and (step >= sample_size)): 347 | break 348 | 349 | # Add batch to GPU 350 | batch = tuple(t.to(self.device) for t in batch) 351 | # Unpack the inputs from our dataloader 352 | x_input_ids, x_input_type_ids, x_input_mask, x_input_feats, y = batch 353 | length = x_input_ids.shape[0] 354 | # Telling the model not to compute or store gradients, saving memory and speeding up validation 355 | with torch.no_grad(): 356 | # Forward pass 357 | outs = self.model(x_input_ids, x_input_type_ids, x_input_mask, x_input_feats) 358 | assert outs.shape == y.shape 359 | loss = self.training_loss(outs, y) 360 | loss_sum += loss.item()*length#we need the sum not mean here, we will take global mean later. 361 | total += length 362 | 363 | b_logits = outs.to("cpu").numpy().tolist() #should be a list of lists, each with num_labels classes. 364 | b_trues = y.to("cpu").numpy().tolist() 365 | 366 | assert (len(b_logits) == len(b_trues)) and (len(b_logits[0]) == len(b_trues[0]) == self.args.num_labels) 367 | 368 | if(self.args.majority_prediction): 369 | #just output 0, that is the majority. 370 | b_preds = [[0 for val in item] for item in b_logits] 371 | else: 372 | b_preds = [[int(val>=0) for val in item] for item in b_logits] # >= 0 means prob >= 0.5 373 | 374 | preds += b_preds 375 | trues += b_trues 376 | 377 | assert len(preds) == len(trues), len(preds) 378 | assert len(preds[0]) == len(trues[0]) == self.args.num_labels, len(preds[0]) 379 | 380 | results = self.get_results(preds, trues, loss_sum, total) 381 | 382 | if(self.args.store_preds): 383 | results["preds"] = preds 384 | results["trues"] = trues 385 | 386 | #Set back to train mode 387 | self.model.train() 388 | 389 | if(during_training): 390 | return results["mean_loss"], results["mean_positive_f1"] 391 | else: 392 | return results 393 | 394 | def get_results(self, preds, trues, loss_sum, total): 395 | 396 | results = {} 397 | 398 | results["mean_loss"] = loss_sum/total 399 | results["label_wise"] = [self.get_label_wise_results(preds, trues, i) for i in range(self.args.num_labels)] 400 | 401 | sum_acc, sum_positive_f1 = 0.0, 0.0 402 | 403 | for item in results["label_wise"]: 404 | sum_acc += item["accuracy"] 405 | sum_positive_f1 += item["positive_f1"] 406 | 407 | results["mean_accuracy"] = sum_acc/len(results["label_wise"]) 408 | results["mean_positive_f1"] = sum_positive_f1/len(results["label_wise"]) 409 | 410 | #Other Overall metrics 411 | results["UL-A"] = self.get_ula(preds, trues) 412 | results["Joint-A"] = self.get_joint_a(preds, trues) 413 | 414 | return results 415 | 416 | def get_ula(self, preds, trues): 417 | """ 418 | utterance level accuracy: average fraction of labels which are predicted accurately in one utterance. 419 | """ 420 | assert len(preds) == len(trues) 421 | 422 | ulas = [] 423 | for pred, true in zip(preds, trues): 424 | this_sum = 0.0 425 | for pi, ti in zip(pred, true): 426 | if(pi == ti): 427 | this_sum += 1 428 | ulas.append(this_sum/len(pred)) 429 | 430 | return np.mean(ulas) 431 | 432 | def get_joint_a(self, preds, trues): 433 | """ 434 | joint accuracy: fraction of utterances in which all the labels are predicted correctly. 435 | """ 436 | counts = 0.0 437 | 438 | for pred, true in zip(preds, trues): 439 | 440 | this_sum = 0 441 | for pi, ti in zip(pred, true): 442 | if(pi == ti): 443 | this_sum += 1 444 | 445 | if(this_sum == len(pred)): 446 | counts += 1 447 | 448 | return counts/len(preds) 449 | 450 | def get_label_wise_results(self, preds, trues, label_ix): 451 | 452 | this_results = {} 453 | 454 | this_preds = [item[label_ix] for item in preds] 455 | this_trues = [item[label_ix] for item in trues] 456 | 457 | this_results["accuracy"] = accuracy_score(y_true=this_trues, y_pred=this_preds) 458 | this_results["positive_f1"] = f1_score(y_true=this_trues, y_pred=this_preds) 459 | this_results["cls_report"] = classification_report(y_true=this_trues, y_pred=this_preds) 460 | 461 | return this_results 462 | 463 | def get_ckpt(self): 464 | """ 465 | create checkpoint object to be stored to a file 466 | """ 467 | 468 | """ 469 | Checkpoint the pytorch model. 470 | """ 471 | ckpt = {} 472 | ckpt["ckpt"] = self.model.state_dict() 473 | ckpt["args"] = vars(self.args) 474 | ckpt["means"] = self.data.scalar.means 475 | ckpt["stds"] = self.data.scalar.stds 476 | 477 | return ckpt 478 | 479 | def load_model_from_ckpt(self, ckpt): 480 | """ 481 | Primarily used to load the best checkpoint after training, so that final evaluation can be done in the same script. 482 | """ 483 | print("Inside load_model_from_ckpt ", file=self.logger) 484 | self.model.load_state_dict(ckpt["ckpt"]) 485 | -------------------------------------------------------------------------------- /data/split/casino_valid.json: -------------------------------------------------------------------------------- 1 | [{"dialogue_id": 157, "chat_logs": [{"text": "Hello there! Are you getting excited for your upcoming trip?! I am so very excited to test my skills!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Hi friend! I'm very excited to go to the trip", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Great! Have you checked to see what the weather has been like in the area you are going to??", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Definitely I will checked. I m eager to prepare each & every things for the trip", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I have checked and see that it is in the rainy season! I know I need to pack some extra firewood if you can spare me some??", "task_data": {}, "id": "mturk_agent_1"}, {"text": "yes. I will definitely give you. I bring extra woods.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Great! Can I take 2 and you can have 1?? I am willing to give you 2 of the water then!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Its pleasure to me. Will you give food extra 1 to me?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I suppose I could do that. I am worried a disease has possibly spread to the area due to the very wet weather, but I can sure fish for most of my food then!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "dont worry at all. while preparing trip, we should take proper precautions. Hence at every moment we are safe", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "2", "Food": "1", "Water": "1"}, "issue2theyget": {"Firewood": "1", "Food": "2", "Water": "2"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_1": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "It is the rainy season where I am traveling, so the abundance of dry firewood to scavenge for is slim.", "Medium": "Due to the rainy season there has been a disease go through the vegetation in the area, so I would like to be prepared in case the same has happened where I am going.", "Low": "There is a lot of rain water I can collect and boil down that is safe to drink."}, "outcomes": {"points_scored": 17, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 30, "gender": "female", "ethnicity": "white american", "education": "master's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 5.0, "agreeableness": 7.0, "conscientiousness": 7.0, "emotional-stability": 5.0, "openness-to-experiences": 7.0}}}, "mturk_agent_2": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "It may be used for other people also. So, only I bring additional", "Medium": "During the trip, food is important. But other people may bring other food package. Hence, I choose this one is medium priority ", "Low": "water is very essential for me. Hence I keep more, then I gave it least priority"}, "outcomes": {"points_scored": 19, "satisfaction": "Slightly satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 27, "gender": "female", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 4.5, "agreeableness": 4.5, "conscientiousness": 6.5, "emotional-stability": 4.5, "openness-to-experiences": 5.0}}}}, "annotations": [["Hello there! Are you getting excited for your upcoming trip?! I am so very excited to test my skills!", "small-talk"], ["Hi friend! I'm very excited to go to the trip", "small-talk"], ["Great! Have you checked to see what the weather has been like in the area you are going to??", "small-talk"], ["Definitely I will checked. I m eager to prepare each & every things for the trip", "small-talk"], ["I have checked and see that it is in the rainy season! I know I need to pack some extra firewood if you can spare me some??", "self-need"], ["yes. I will definitely give you. I bring extra woods.", "no-need"], ["Great! Can I take 2 and you can have 1?? I am willing to give you 2 of the water then!", "promote-coordination"], ["Its pleasure to me. Will you give food extra 1 to me?", "non-strategic"], ["I suppose I could do that. I am worried a disease has possibly spread to the area due to the very wet weather, but I can sure fish for most of my food then!", "no-need"], ["dont worry at all. while preparing trip, we should take proper precautions. Hence at every moment we are safe", "showing-empathy"]]}, {"dialogue_id": 431, "chat_logs": [{"text": "Hello there", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hello", "task_data": {}, "id": "mturk_agent_1"}, {"text": "What kind of items do you need? I especially need water because I would like to do extra hiking and would need to hydrate. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I need all three, but need food the most", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I would give you all of the additional food if you gave me all of the additional water. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That sounds like a deal", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Shall we divide the firewood two to one? ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "sure as long as I am getting two wood. It gets very cold at night where I go camping", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Sure, since you were so willing to accommodate my need for water, I would be happy to oblige. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Thanks, these extra supplies will really help me", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "3", "Firewood": "1", "Food": "0"}, "issue2theyget": {"Water": "0", "Firewood": "2", "Food": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Low": "Food", "High": "Water", "Medium": "Firewood"}, "value2reason": {"High": "I may want to do additional hiking and would need to hydrate.", "Medium": "I may want to stay up later and will need the fire light.", "Low": "I may need additional calories if I choose to hike more. "}, "outcomes": {"points_scored": 19, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 33, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, no degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.0, "agreeableness": 4.0, "conscientiousness": 3.0, "emotional-stability": 3.0, "openness-to-experiences": 4.5}}}, "mturk_agent_1": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "My family loves to eat and eats a lot of food", "Medium": "It gets very cold at night where I go camping", "Low": "We do a lot of hiking and exercise on are camping trip"}, "outcomes": {"points_scored": 23, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 31, "gender": "male", "ethnicity": "white american", "education": "high school graduate / ged"}, "personality": {"svo": "proself", "big-five": {"extraversion": 1.5, "agreeableness": 5.5, "conscientiousness": 6.0, "emotional-stability": 5.5, "openness-to-experiences": 5.5}}}}, "annotations": [["Hello there", "non-strategic"], ["Hello", "non-strategic"], ["What kind of items do you need? I especially need water because I would like to do extra hiking and would need to hydrate. ", "elicit-pref,self-need"], ["I need all three, but need food the most", "non-strategic"], ["I would give you all of the additional food if you gave me all of the additional water. ", "non-strategic"], ["That sounds like a deal", "non-strategic"], ["Shall we divide the firewood two to one? ", "promote-coordination"], ["sure as long as I am getting two wood. It gets very cold at night where I go camping", "self-need"], ["Sure, since you were so willing to accommodate my need for water, I would be happy to oblige. ", "promote-coordination"], ["Thanks, these extra supplies will really help me", "small-talk"]]}, {"dialogue_id": 375, "chat_logs": [{"text": "Hi, have you camped here before\ud83d\ude42\ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "No, its my first time but I hear that the trails are good for running on\ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "It's a nice place but a bit deserted this time of year", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Yeah, I assume the virus mess is keeping some people away. But thats why I chose to come out here now for my sanity!", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Did you forget anything? One of my group chickened out at the last moment and he was bringing extra food so we could use some if you can spare any\ud83d\ude2e", "task_data": {}, "id": "mturk_agent_1"}, {"text": "\ud83d\ude2e Oh that sucks, cause I too forgot to pack the pack with some of my food and cooking fuel. Perhaps we could split the food. How are you for fire wood?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "We have too much firewood, we hate carrying it around anyways. We cam always some water too although the food is more important", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Perhaps we can do some kind of win-win. Maybe 2 foods to you, 3 waters, and then all the wood for me? Once we're done maybe could check out the trails.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Thank sounds like a great deal to me, let's do it\ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Ok\ud83d\ude42. Sounds good to me too. So would you put in 2 food, 3 waters, and 0 firewood on your end? Then we can get down to camping in the wild\ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "2", "Water": "3", "Firewood": "0"}, "issue2theyget": {"Food": "1", "Water": "0", "Firewood": "3"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_1": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "The kids are very hungry tonight.", "Medium": "It's hotter than we expected", "Low": "The wood is too heavy to carry"}, "outcomes": {"points_scored": 22, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 56, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 2.5, "agreeableness": 5.5, "conscientiousness": 4.0, "emotional-stability": 6.5, "openness-to-experiences": 4.0}}}, "mturk_agent_2": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "My wasn't packed in the car when we left. ", "Medium": "Its darn cold up in the mountains at night!", "Low": "Did remember to pack water and have plenty."}, "outcomes": {"points_scored": 17, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 54, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 1.5, "agreeableness": 6.5, "conscientiousness": 3.5, "emotional-stability": 4.5, "openness-to-experiences": 4.5}}}}, "annotations": []}, {"dialogue_id": 378, "chat_logs": [{"text": "Hello", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hi, how are you? Do you need extra firewood to keep warm and maybe have a bonfire?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I am good. Yes I do need extra firewood and food because I have a large group that will be hungry", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I have diabetes and have to have several small meals. Without food, I pass out. ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Ok I do not need all the food. I would be willing to give you more in exchange for extra firewood and water", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I would be ok with 2 food and a couple of waters. That would leave you with plenty for your party. \ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Ok I would be ok with getting 1 package of food and water. Since you are getting the majority of those, do I get to take all the firewood for my bonfire?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Would you mind if I sit by the fire some to warm up before going to bed?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "You mean by the bonfire? I wouldn't mind at all!", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That sounds wonderful! \ud83d\ude42 I really do need the food. So, would you be ok with me having the food and a couple of the waters. You can have all the wood and a water? \ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I would prefer to have at least one package of food as I have a large group and need some food to feed. I think you having two packages of water and two packages of food is fairly split up. Do you agree?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Can I have 1 of the firewood then so I can warm my food?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I think the original deal is fine and you can warm your food with my fire. So you take all the food and the majority of water with me taking the firewood and a package of the water. Is that fair?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That sounds fair. Thank you\ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "1", "Firewood": "3", "Food": "0"}, "issue2theyget": {"Water": "2", "Firewood": "0", "Food": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Low": "Food", "High": "Water", "Medium": "Firewood"}, "value2reason": {"High": "My group will be moving around so we need to be hydrated", "Medium": "I need firewood to cook the food", "Low": "I have a large group that needs extra food"}, "outcomes": {"points_scored": 17, "satisfaction": "Slightly satisfied", "opponent_likeness": "Undecided"}, "demographics": {"age": 19, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, no degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 5.0, "agreeableness": 2.5, "conscientiousness": 5.5, "emotional-stability": 6.0, "openness-to-experiences": 4.0}}}, "mturk_agent_1": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "I m diabetic and have to eat many small meals.", "Medium": "I can't have anything to drink but water because of my health issues so it is super important.", "Low": "I go to bed early and have a great sleeping bag so I can stay very warm."}, "outcomes": {"points_scored": 23, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 49, "gender": "female", "ethnicity": "white american", "education": "some 2 year college, associate's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 4.0, "agreeableness": 5.0, "conscientiousness": 7.0, "emotional-stability": 5.0, "openness-to-experiences": 4.5}}}}, "annotations": []}, {"dialogue_id": 642, "chat_logs": [{"text": "Hello", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hey there. How are you today? ) Looks like we have some extra necessities to distribute for our camping trips.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'm good, I hope you're well too. Yes I see that as well. Is there anything you need as a priority?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I'm good, thanks. Well, there's a few of us so food would be great for us. We're going hiking and will probably go through what we have fast. Water is also good, for that reason. What about you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "My group is planning on doing quite a bit of hiking while we're camping and will need extra water and some extra food given the physical exertion we're planning. We don't need much firewood as we have brought some extra from home. If we can have 2 of the 3 waters we'd be happy to take only 1 of the food.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That sounds good to me. Do you want some of the firewood at all?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Perhaps we could use just 1 wood. That would be 2 water, 1 food and 1 wood for us and the rest for you? How would that do for your group?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That sounds like a plan. That would be great.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Do you camp often?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I was just about to ask you that! Yeah, not as much as I use to, but it's fun when I can make it out. How about you? ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Same for me. I went camping more often as a child and wish I could go more now.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "2", "Firewood": "2", "Water": "1"}, "issue2theyget": {"Food": "1", "Firewood": "1", "Water": "2"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "I plan to hike a lot during this camping trip and therefore will need more hydration.", "Medium": "Along with water for the hiking is a need to eat extra calories.", "Low": "I don't need much firewood because I had some at my house that I am bringing along with me."}, "outcomes": {"points_scored": 17, "satisfaction": "Extremely satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 34, "gender": "female", "ethnicity": "white american", "education": "some 4 year college, no degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 2.0, "agreeableness": 6.5, "conscientiousness": 5.5, "emotional-stability": 4.5, "openness-to-experiences": 4.5}}}, "mturk_agent_1": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "There are 3 of us and we are planning on going on a hike, more food would be good for us.", "Medium": "We plan to keep the fire going non-stop and need it to cook the food.", "Low": "Water is plentiful out in the wild, but it would be nice to have it so we would not have to boil and prepare any extra water we may need."}, "outcomes": {"points_scored": 21, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 32, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, no degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 4.5, "agreeableness": 5.5, "conscientiousness": 5.5, "emotional-stability": 7.0, "openness-to-experiences": 6.5}}}}, "annotations": []}, {"dialogue_id": 908, "chat_logs": [{"text": "Hello i would like to trade you for some firewood please.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Ok! I'm super excited to be camping soon with my family! We're planning to camp out on the beach and will have limited access to the freshwater pipes there. But we plan to do a lot of fishing, it will be fun! What do you plan to be doing with the firewood?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Sounds really fun! I will be cooking food for my family and making lots of smore's and of course singing songs around the campfire. But you can't have a campfire without firewood!", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That's true, smores over a butane stove doesn't quite make as fun memories as over a campfire.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "haha they don't thats for sure. Nothing quite like the crackling of a fire and the smell of smoke. What kind of fish are you hoping to catch?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "We're not 100% sure since there's all kinds of fish where we're going. My husband also wants to try crab and lobster catching too. It'll be a great way for my son to get out of the house. He's driving me crazy, with all of us cooped up due to Covid", "task_data": {}, "id": "mturk_agent_1"}, {"text": "oh wow that does sound great! Ya i bet, i am also going crazy cooped up in the house with my three younger siblings", "task_data": {}, "id": "mturk_agent_2"}, {"text": "So far, I've packed a lot of water, but with how active my son and husband are, I'm not sure if its enough. They plan to be doing a lot of swimming, fishing, and playing in the sand. The weather forecast is also looking like its going to be really hot. How's your planning coming along? Are you only in need of firewood?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Don't want them getting dehydrated for sure! Thats a sure fire way to ruin a camping trip. My plan is coming along well thanks for asking! I need a little bit of water and a little bit of food as well. We are planning to go hiking near a mountain so during the days we will be gone on the trails and will need to bring a bit of food and water with us", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That's nice! I know we're planning to cook whatever fish we catch (because its always tastier when you've grown/caught it yourself). We're planning to bring a butane stove with us but we were thinking of making a campfire for one of the days so that my son gets the experience. Idk, do you think beach driftwood would cut it?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Wouldn't be quite the same for sure, there is nothing quite like an authentic campfire", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "3", "Firewood": "0", "Food": "2"}, "issue2theyget": {"Water": "0", "Firewood": "3", "Food": "1"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Low": "Food", "Medium": "Water", "High": "Firewood"}, "value2reason": {"High": "I would need more firewood to be able to continue cooking food and have a campfire at night for fun to roast marshmellows.", "Medium": "To drink while I am hiking. ", "Low": "to eat while i am hiking,"}, "outcomes": {"points_scored": 18, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 20, "gender": "female", "ethnicity": "white american", "education": "some 2 year college, associate's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 4.0, "agreeableness": 4.5, "conscientiousness": 4.0, "emotional-stability": 4.5, "openness-to-experiences": 3.0}}}, "mturk_agent_1": {"value2issue": {"Low": "Food", "High": "Water", "Medium": "Firewood"}, "value2reason": {"High": "We will be camping at a beach and will have limited access to a fresh water source", "Medium": "We will be fishing from the ocean for most of the meals and would like to cook them on an open fire", "Low": "We will be fishing to get food."}, "outcomes": {"points_scored": 21, "satisfaction": "Extremely satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 27, "gender": "female", "ethnicity": "asian american", "education": "some 4 year college, no degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 2.5, "agreeableness": 6.0, "conscientiousness": 6.0, "emotional-stability": 4.5, "openness-to-experiences": 4.5}}}}, "annotations": []}, {"dialogue_id": 969, "chat_logs": [{"text": "hi", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hello. How are you? \ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Good thanks. I think water is heaviest to carry so it should be split ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "We can do that. How about 2 for me and 1 for you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "thats fair. In exchange I could have two food packages and one wood? You'd get one food and two woods?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "sure that sounds pretty fair to me too", "task_data": {}, "id": "mturk_agent_1"}, {"text": "awesome \ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I hope your trip goes well! And thank you for the easy nagotiation. ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "you too. stay safe out there in camping-land", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Thank you so much! ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "2", "Water": "2", "Firewood": "1"}, "issue2theyget": {"Food": "1", "Water": "1", "Firewood": "2"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "being outside makes people more hungry", "Medium": "I'm a thirsty person even when at home", "Low": "Its heavy and inconvenient to carry "}, "outcomes": {"points_scored": 21, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 33, "gender": "female", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 1.0, "agreeableness": 3.0, "conscientiousness": 7.0, "emotional-stability": 4.0, "openness-to-experiences": 3.0}}}, "mturk_agent_1": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "I need water because I have a condition that requires me to drink a lot.", "Medium": "We are a couple of extra people so we need a bit more food.", "Low": "We have enough and we can find more in the woods. "}, "outcomes": {"points_scored": 15, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 36, "gender": "male", "ethnicity": "white american", "education": "some 2 year college, associate's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 3.0, "agreeableness": 6.5, "conscientiousness": 5.0, "emotional-stability": 1.0, "openness-to-experiences": 4.0}}}}, "annotations": []}, {"dialogue_id": 336, "chat_logs": [{"text": "hello", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hi there, hope I would be able to exchange some needed items for my family of 7 from you.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "wow that is much", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That's the typical reaction I get \ud83d\ude42. That said, I would like to get the basics for our survival - food and water.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "likewise me to", "task_data": {}, "id": "mturk_agent_2"}, {"text": "of the two, which is your priority? Mine is water", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Also water", "task_data": {}, "id": "mturk_agent_2"}, {"text": "ok. How about 1 take 1 water, 2 food and 2 firewood", "task_data": {}, "id": "mturk_agent_1"}, {"text": "no that not fair for me", "task_data": {}, "id": "mturk_agent_2"}, {"text": "what are your options?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "3 food 2 firewood and you can have 3 food and 1 firewood", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I would take 3 water and 1 firewood", "task_data": {}, "id": "mturk_agent_1"}, {"text": "that was a mistake i mean i would take 3 water and 2 firewood", "task_data": {}, "id": "mturk_agent_2"}, {"text": "that's not fair to me as well. I clearly stated water as our family's priority item.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "i also have that as my highest priority", "task_data": {}, "id": "mturk_agent_2"}, {"text": "In that case, I get 3 packs of food and 2 packs of firewood - final offer", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "3", "Firewood": "1", "Food": "0"}, "issue2theyget": {"Water": "0", "Firewood": "2", "Food": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Low": "Food", "High": "Water", "Medium": "Firewood"}, "value2reason": {"High": "i need water for survival", "Medium": "i need firewood for fire", "Low": "i need food for nourishment"}, "outcomes": {"points_scored": 19, "satisfaction": "Slightly satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 30, "gender": "male", "ethnicity": "white american", "education": "master's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 3.5, "agreeableness": 4.5, "conscientiousness": 3.5, "emotional-stability": 6.0, "openness-to-experiences": 3.5}}}, "mturk_agent_1": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "To keep being hydrated during the hot summer afternoons", "Medium": "To keep the bodies of our family members healthy on the trip", "Low": "To have sufficient for campfires at night"}, "outcomes": {"points_scored": 18, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 33, "gender": "female", "ethnicity": "black or african american", "education": "master's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 3.5, "agreeableness": 6.0, "conscientiousness": 7.0, "emotional-stability": 7.0, "openness-to-experiences": 5.5}}}}, "annotations": []}, {"dialogue_id": 937, "chat_logs": [{"text": "Good evening Friend", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Hello! How are you \ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hi good evening", "task_data": {}, "id": "mturk_agent_1"}, {"text": "So what do you want for your camping trip the most?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I need additional water", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Ok! How about I give you the water and you give me food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "okey ,Why did you need additional food", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I do not have enough food for my trip \u2639\ufe0f", "task_data": {}, "id": "mturk_agent_2"}, {"text": "What do you think about additional fierwood?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "We can split the firewood. How much is water worth to you?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "2", "Firewood": "2", "Water": "3"}, "issue2theyget": {"Food": "1", "Firewood": "1", "Water": "0"}}, "id": "mturk_agent_1"}, {"text": "Reject-Deal", "task_data": {"data": "reject_deal"}, "id": "mturk_agent_2"}, {"text": "No, that is a terrible offer, you get more of everything", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Sorry for that if I get addition things , I can share with other who needs that", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Yes, so we should split it evenly", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Sure , what does your remaining need?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "3", "Firewood": "1", "Water": "0"}, "issue2theyget": {"Food": "0", "Firewood": "2", "Water": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_1": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "If I get some additional, I can share with the others who dose not have food", "Medium": "If the firewood is not enough in the cam I can use the additional firewood", "Low": "Water is essential for everyone I can share with others who dose need water"}, "outcomes": {"points_scored": 17, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 35, "gender": "male", "ethnicity": "alaska native or native american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 2.5, "agreeableness": 2.5, "conscientiousness": 7.0, "emotional-stability": 7.0, "openness-to-experiences": 5.5}}}, "mturk_agent_2": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "I need food to eat because I don't have enough for my trip", "Medium": "I need firewood for warmth and to cook my food", "Low": "More water to drink would be nice"}, "outcomes": {"points_scored": 19, "satisfaction": "Slightly satisfied", "opponent_likeness": "Extremely dislike"}, "demographics": {"age": 23, "gender": "male", "ethnicity": "asian american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 5.5, "agreeableness": 5.5, "conscientiousness": 5.5, "emotional-stability": 5.5, "openness-to-experiences": 5.0}}}}, "annotations": []}, {"dialogue_id": 981, "chat_logs": [{"text": "Hi nice to meet you. Can I ask what you need to make this a great camping trip? \ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Sure \ud83d\ude42 I actually completely forgot water at home so I was wondering if I could take all three packages of water", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Yes that works for me if I could get all three firewood. It is supposed to be cold tonight. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Do you think maybe you could get 2 packages of firewood and I get one package? I would be happy to let you have 2 of 3 food packages, I'm trying not to over do it on food", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Well we do need food for the animals. Could we also get one of the waters then?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I do really need the water. What if you took all 3 of the food packages and 2 of the firewood?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I would really want all 3 firewood if I'm not getting any water. How important is the water to you?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "The water is the highest priority for me, but I would also like just one firewood package so I can make sure my group keeps warm tonight", "task_data": {}, "id": "mturk_agent_1"}, {"text": "How about we take 1 water, 2 firewood and 3 food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hmm, I'm afraid I can't agree to that. You would be getting 6 packages while I'm left with only 3. I'm afraid I'm going to have to walk away from that deal", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Ok how about you take all 3 water and 1 firewood. You would be getting all 3 of your highest priority and I wouldn't be but I would be getting 1 more package", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That sounds fair to me!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "2", "Food": "3", "Water": "0"}, "issue2theyget": {"Firewood": "1", "Food": "0", "Water": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "It is cold and we need a fire to stay warm.", "Medium": "We have animals that eat extra food", "Low": "We like to drink beer not water"}, "outcomes": {"points_scored": 22, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 41, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 2.5, "agreeableness": 6.5, "conscientiousness": 6.5, "emotional-stability": 6.0, "openness-to-experiences": 5.0}}}, "mturk_agent_1": {"value2issue": {"Low": "Food", "Medium": "Water", "High": "Firewood"}, "value2reason": {"High": "I really enjoy making smores and I get easily cold.", "Medium": "I completely forgot water at home and I know I will need this.", "Low": "I'm currenty on a diet and I'm trying not to over do it on the food, it's really easy for me to go overboard when I'm on vacation."}, "outcomes": {"points_scored": 17, "satisfaction": "Extremely satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 30, "gender": "female", "ethnicity": "multi-racial", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 5.5, "agreeableness": 7.0, "conscientiousness": 7.0, "emotional-stability": 3.5, "openness-to-experiences": 4.5}}}}, "annotations": []}, {"dialogue_id": 762, "chat_logs": [{"text": "Hi! I hope you are doing good. I would like to ask few packages for the tripping?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Sure. I would like to have 2 of each item.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'm not okay with that I will be needing 3 water, 2 food and 1 firewood, and 0 water 1 food and 2 firewood it is ok?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "No, I'll accept all the firewood and 2 food though.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I can go for 2 water, 2 food and 1 fire wood and the rest you can have, As a big crew is coming along.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I'd like to get as much firewood as possible since the weather report says it's going to be cold. 2 firewood, 2 food and 1 water for me, rest to you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "that would be hard deal, for me food is essential for all can you please share one more, so I will have 3 water, 2 food and 1 firewood", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I shouldn't have a problem with water, since we'll be camping near a spring but would like one just in case. 3 firewood, 1 food, 1 water for me?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I can accept but you can give 1 firewood, which will save us from cold? will you?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I have to have 2 firewood minimum.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I can accept if you can give me just 1 firewood? and 2 water 2 food for me and rest for you? so that both us will be beneficial", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "2", "Food": "1", "Water": "1"}, "issue2theyget": {"Firewood": "1", "Food": "2", "Water": "2"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "The most useful think for camping is keep us hydrated so water is very necessary", "Medium": "food is need for us to get the energy back, else we will be carving", "Low": "a set of firewood is completely enough not more is need."}, "outcomes": {"points_scored": 21, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 32, "gender": "female", "ethnicity": "white american", "education": "master's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 6.0, "agreeableness": 4.0, "conscientiousness": 4.0, "emotional-stability": 2.5, "openness-to-experiences": 5.0}}}, "mturk_agent_1": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "It is winter and very cold outside. You may also need to heat up the food.", "Medium": "You can most likely scavange for edible plants somewhere.", "Low": "You camped near a spring that has fresh water to drink."}, "outcomes": {"points_scored": 17, "satisfaction": "Slightly dissatisfied", "opponent_likeness": "Undecided"}, "demographics": {"age": 44, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 3.5, "agreeableness": 3.0, "conscientiousness": 4.0, "emotional-stability": 3.0, "openness-to-experiences": 3.5}}}}, "annotations": []}, {"dialogue_id": 1028, "chat_logs": [{"text": "Hi. I am pretty excited to take my son and his friends camping. They have so much energy", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Hey, I am also going camping but I am taking my 3 kids \ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Between us we have our hands full.\ud83d\ude42 So I am hoping to be able to score 3 food units and 2 waters. What are your needs?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I can work with that but is there any way I can get 2 waters instead of just 1? There's nowhere to shower here", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Oh sure! I am okay with a jump in the river if it is not too cold! I need at least one firewood because I love to sew before bed but I need the light!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "That is fine. I can give up 1 firewood. Any way I can get 1 food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "We really do need food because teens.\ud83d\ude42\ud83d\ude42 But how about I give you 1 food and 1 firewood? Oh. That's what you just said! Great minds think alike.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'll just take 2 firewood 2 water if that's OK", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Oh well, I guess so. \u2639\ufe0f I will probably fall asleep early anyway. \ud83d\ude42 When are you leaving for your camp adventure?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "In about 30 minutes actually. Gotta get going so we can get there before noon", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "3", "Water": "1", "Firewood": "1"}, "issue2theyget": {"Food": "0", "Water": "2", "Firewood": "2"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_1": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "Teenage campers are active and burn calories.", "Medium": "We will all be working up a sweat and need replenisment.", "Low": "Sewing at night calms me so I need light"}, "outcomes": {"points_scored": 22, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 63, "gender": "female", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 6.0, "agreeableness": 6.5, "conscientiousness": 6.5, "emotional-stability": 6.5, "openness-to-experiences": 6.5}}}, "mturk_agent_2": {"value2issue": {"Low": "Food", "Medium": "Water", "High": "Firewood"}, "value2reason": {"High": "I need it to cook my food and to keep warm at night.", "Medium": "I need some water to wash myself with as there is no shower.", "Low": "I've brought a ton of food and have it in my cooler."}, "outcomes": {"points_scored": 18, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 29, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 2.0, "agreeableness": 7.0, "conscientiousness": 6.5, "emotional-stability": 5.0, "openness-to-experiences": 4.0}}}}, "annotations": []}, {"dialogue_id": 506, "chat_logs": [{"text": "Hello, How are you? My children love to eat and have fires daily. I hope this deal works for you.\ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hello, I'm fine. I understand your need. I have health issue I can't stand without food and water.I hope you will understand my situation.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I completely understand where you are coming from. How much food do you need?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I need at least 2 package of food and 3 package of water. Please do favor for me.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I have young teenagers who eat and drink like crazy. I will need atleast 1 package of water, I may be able to work on the food. What do you think?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I can also understand your family situation. I'll give 1 package of water.\ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "That works for me.\ud83d\ude42 Are you able to share the food if I give you 1 firewood?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I think our dealing is going good. You take all the firewood.As I already said, I have some health issue. Can you help me with the food?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Sounds good I will give you the 2 packages of food.\ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "So nice of you !! Now can you summarize your needs?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I will need 3 packages of firewood. 1 package of food and 1 package of water. What are your needs?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Yes, you are absolutely right. Thank you very much !! I'll take 2 package of food and 2 package of water .", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "3", "Food": "1", "Water": "1"}, "issue2theyget": {"Firewood": "0", "Food": "2", "Water": "2"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "My kids really enjoy campfires and we have ton of them.", "Medium": "I have 3 kids and they are always hungry and eating. Teenagers eat a ton.", "Low": "If it is hot out we will drink more water as a family. If not we won't need as much."}, "outcomes": {"points_scored": 22, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 34, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 6.5, "agreeableness": 4.0, "conscientiousness": 6.0, "emotional-stability": 4.0, "openness-to-experiences": 4.5}}}, "mturk_agent_1": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "I have a health issue without water I can't able to do anything.", "Medium": "If I have water, I can manage somewhat with the food.", "Low": "I'll manage my self by drinking water, So , I prefer some less firewood."}, "outcomes": {"points_scored": 18, "satisfaction": "Slightly satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 24, "gender": "female", "ethnicity": "black or african american", "education": "some 4 year college, no degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 6.5, "agreeableness": 3.5, "conscientiousness": 6.0, "emotional-stability": 5.5, "openness-to-experiences": 6.5}}}}, "annotations": [["Hello, How are you? My children love to eat and have fires daily. I hope this deal works for you.\ud83d\ude42", "small-talk"], ["Hello, I'm fine. I understand your need. I have health issue I can't stand without food and water.I hope you will understand my situation.", "self-need"], ["I completely understand where you are coming from. How much food do you need?", "showing-empathy"], ["I need at least 2 package of food and 3 package of water. Please do favor for me.", "vouch-fair"], ["I have young teenagers who eat and drink like crazy. I will need atleast 1 package of water, I may be able to work on the food. What do you think?", "small-talk"], ["I can also understand your family situation. I'll give 1 package of water.\ud83d\ude42", "showing-empathy"], ["That works for me.\ud83d\ude42 Are you able to share the food if I give you 1 firewood?", "promote-coordination"], ["I think our dealing is going good. You take all the firewood.As I already said, I have some health issue. Can you help me with the food?", "promote-coordination"], ["Sounds good I will give you the 2 packages of food.\ud83d\ude42", "non-strategic"], ["So nice of you !! Now can you summarize your needs?", "non-strategic"], ["I will need 3 packages of firewood. 1 package of food and 1 package of water. What are your needs?", "non-strategic"], ["Yes, you are absolutely right. Thank you very much !! I'll take 2 package of food and 2 package of water .", "non-strategic"]]}, {"dialogue_id": 823, "chat_logs": [{"text": "hi how are you\ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I am good! I am pretty excited to go camping this weekend, how about you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I will go hiking with my friends tomorrow", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Nice! So i am going to a nearby desert to camp, so i would like to bring as much water as possible. I would willing to take all the water and either 1 food or firewood if that is ok.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "You can have all the water since it just rained today. But I'm afraid I cannot get any firewood or food in the mountain. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "that would be great, i really only one one of either. up to you which one you want to give me.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "So can I have 3 firewood and 2 food", "task_data": {}, "id": "mturk_agent_2"}, {"text": "sounds good to me, if thats fine with you", "task_data": {}, "id": "mturk_agent_1"}, {"text": " you have a safe trip", "task_data": {}, "id": "mturk_agent_2"}, {"text": "You too! mind sumbitting the deal?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "0", "Food": "2", "Firewood": "3"}, "issue2theyget": {"Water": "3", "Food": "1", "Firewood": "0"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "people can not live without water for more than 3 days", "Medium": "people can live without food for couple weeks", "Low": "I can use it for cooking"}, "outcomes": {"points_scored": 17, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 32, "gender": "female", "ethnicity": "asian american", "education": "high school graduate / ged"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.0, "agreeableness": 4.0, "conscientiousness": 4.0, "emotional-stability": 4.0, "openness-to-experiences": 4.0}}}, "mturk_agent_1": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "I will be camping near a desert, where water is scarse", "Medium": "The heat will take energy out of you quickly, so you need food", "Low": "the desert i am camping near is hot enough"}, "outcomes": {"points_scored": 19, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 24, "gender": "female", "ethnicity": "black or african american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 3.5, "agreeableness": 4.5, "conscientiousness": 6.0, "emotional-stability": 6.5, "openness-to-experiences": 6.5}}}}, "annotations": []}, {"dialogue_id": 924, "chat_logs": [{"text": "What are your preferences on extra supplies you preffer?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hi! I would prefer to take all of the food. You can have all the firewood. As far as water, would you be ok with me taking all that too? I have a huge family. Brought my elderly grandmother also \ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Would you be ok with taking 2 packs of food instead of all 3?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I prefer all 3, would you be willing to take a water instead?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "since I'm camping alone and you have a family if I can give you 2 fire wood, 2 food and 2 water and I have 1 extra supply of each. Would that work for you and the family?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That actually will work for me as long as you are ok with it", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I feel since your with a family it would be ok with me. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Thank you! I appreciate the generosity ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "will your family be ok with that deal?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Yes! We will. We will enjoy our camping trip with these extra supplies", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "1", "Firewood": "1", "Water": "1"}, "issue2theyget": {"Food": "2", "Firewood": "2", "Water": "2"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "To survive during the camping trip.", "Medium": "To stay warm during the camping trip.", "Low": "Stay hydrated during the camping trip."}, "outcomes": {"points_scored": 12, "satisfaction": "Slightly satisfied", "opponent_likeness": "Undecided"}, "demographics": {"age": 31, "gender": "male", "ethnicity": "white american", "education": "some 2 year college, no degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 2.5, "agreeableness": 7.0, "conscientiousness": 7.0, "emotional-stability": 5.5, "openness-to-experiences": 4.5}}}, "mturk_agent_1": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "I have a huge family and we all can get good portions if we get more food", "Medium": "We need this to survive", "Low": "We need this to keep warm since we are a big family we may burn more"}, "outcomes": {"points_scored": 24, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 31, "gender": "female", "ethnicity": "black or african american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.5, "agreeableness": 6.5, "conscientiousness": 7.0, "emotional-stability": 7.0, "openness-to-experiences": 7.0}}}}, "annotations": []}, {"dialogue_id": 147, "chat_logs": [{"text": "Hello my friend! Are you ready to go camping?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Getting there, just need some more supplies to be safe.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Got you! I really need firewood to make smores and I don't think we have enough to last the whole night!", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I was hoping to pick up a lot of wood. It has rained around here and the wood is soggy in the forest.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Which item do you prefer the most?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I know how to filter water so you can have all of the water. I would like as much firewood as possible.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "me too. I don't care about water since we are camping near a river.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I would consider giving you all food and water if I could get all of the wood.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Oh really? I think I am able to do it without firewood then. The kids will be full and probably won't ask for smores", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Or 1 wood for you and 2 of food and water?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I am fine with that as well. So I get wood, 2 water and 2 food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "2", "Food": "1", "Water": "1"}, "issue2theyget": {"Firewood": "1", "Food": "2", "Water": "2"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "I promised my kids that we are going to make smores and they can stay up all night telling horror stories to each other. our current supply might only last a few hours. ", "Medium": "We have good supply of food and we have snacks too. We can fish and roast the fish in the fire. It will a great experience. ", "Low": "We can drink water from the nearby river although I think bottled water tastes better. "}, "outcomes": {"points_scored": 19, "satisfaction": "Extremely satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 40, "gender": "female", "ethnicity": "asian american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 3.5, "agreeableness": 6.0, "conscientiousness": 4.0, "emotional-stability": 5.5, "openness-to-experiences": 3.0}}}, "mturk_agent_1": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "I do not have tools to cut trees and I need fire to cook.", "Medium": "I have hunting skills and some pre made food.", "Low": "I know how to filter from natural sources."}, "outcomes": {"points_scored": 17, "satisfaction": "Slightly satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 40, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 1.5, "agreeableness": 3.5, "conscientiousness": 4.5, "emotional-stability": 1.5, "openness-to-experiences": 6.0}}}}, "annotations": [["Hello my friend! Are you ready to go camping?", "small-talk"], ["Getting there, just need some more supplies to be safe.", "small-talk,self-need"], ["Got you! I really need firewood to make smores and I don't think we have enough to last the whole night!", "self-need,other-need"], ["I was hoping to pick up a lot of wood. It has rained around here and the wood is soggy in the forest.", "self-need"], ["Which item do you prefer the most?", "elicit-pref"], ["I know how to filter water so you can have all of the water. I would like as much firewood as possible.", "no-need,self-need"], ["me too. I don't care about water since we are camping near a river.", "no-need"], ["I would consider giving you all food and water if I could get all of the wood.", "non-strategic"], ["Oh really? I think I am able to do it without firewood then. The kids will be full and probably won't ask for smores", "no-need"], ["Or 1 wood for you and 2 of food and water?", "non-strategic"], ["I am fine with that as well. So I get wood, 2 water and 2 food?", "non-strategic"]]}, {"dialogue_id": 388, "chat_logs": [{"text": "hello", "task_data": {}, "id": "mturk_agent_1"}, {"text": "hiya", "task_data": {}, "id": "mturk_agent_2"}, {"text": "what do you think about this tarde?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'm not seeing your trade offer?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "i just need of 2 pack of food and 1 pack of water", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I need more food because I have low blood sugar. Can I get one more pack of food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "yes you can", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'm not sure what the weather would be like on our camping trip, but I think I'll just need one package of firewood. I could always find some twigs or small branches if need be. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "i don't need firewood, instead you can give additional pack of food", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I feel like I'm getting everything I want but you are so nice if you're going to let me walk away with 2 waters, 2 food packages, and 3 firewood packages. \ud83d\ude2e", "task_data": {}, "id": "mturk_agent_2"}, {"text": "yes. we can submit our deal. thank you for your valuable time with me", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "0", "Water": "2", "Food": "2"}, "issue2theyget": {"Firewood": "3", "Water": "1", "Food": "1"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_1": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "water is my most needed one", "Medium": "food is my second favorite one", "Low": "firewood is my least requirement"}, "outcomes": {"points_scored": 20, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 52, "gender": "female", "ethnicity": "white american", "education": "master's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 5.0, "agreeableness": 4.0, "conscientiousness": 6.0, "emotional-stability": 6.5, "openness-to-experiences": 6.0}}}, "mturk_agent_2": {"value2issue": {"Low": "Food", "Medium": "Water", "High": "Firewood"}, "value2reason": {"High": "The weather might be cold.", "Medium": "I might do a lot of hiking.", "Low": "My blood sugar might drop if I don't eat."}, "outcomes": {"points_scored": 14, "satisfaction": "Slightly satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 58, "gender": "female", "ethnicity": "alaska native or native american", "education": "some 2 year college, associate's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 5.5, "agreeableness": 4.5, "conscientiousness": 7.0, "emotional-stability": 4.0, "openness-to-experiences": 6.0}}}}, "annotations": []}, {"dialogue_id": 745, "chat_logs": [{"text": "\ud83d\ude42 Hi, how would you best describe your party needs?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Hi! I could really use some water. I'm very concerned about my kids getting dehydrated. One of my kiddos really struggles with it. I could really use 3 extra waters. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I cannot spare a single water. I need all three waters because we have our grandparents who struggle with rheumatoid arthritis; they could die if they have no water. Could you give us all 3 of your waters?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Wow, that's asking a lot. For me to give you all 3 would be risky for me. The only way I would consider it is if you could give me all of the firewood and food. At least if I had extra firewood I could boil water out in the wild to help make up for the water I'm missing. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Agreed to the firewood. We are at an impasse on the food situation. Our party also has a large number of folks, so we will need at least 2 foods. If we are giving you all our firewood, then we will need 3 foods because we will be unable to cook. I believe your children should be alright as long as your food satisfies their dietary needs.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I don't know that I could give you all the food. What about I get 1 water, 3 firewoods, and 1 food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "You will need to give us all of your water for this amount of firewood and food. ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I will give you 3 waters, if you give me 3 firewoods and 2 foods. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I will give you 3 firewoods and 1 food if you give me 3 waters.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Okay, I can make that work. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "3", "Food": "2", "Firewood": "0"}, "issue2theyget": {"Water": "0", "Food": "1", "Firewood": "3"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_1": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "I need water so I can clean myself after sexual activities.", "Medium": "I need food to survive.", "Low": "Firewood is not needed because we cut trees."}, "outcomes": {"points_scored": 23, "satisfaction": "Extremely satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 25, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 4.0, "agreeableness": 4.0, "conscientiousness": 4.5, "emotional-stability": 6.0, "openness-to-experiences": 3.5}}}, "mturk_agent_2": {"value2issue": {"Low": "Food", "High": "Water", "Medium": "Firewood"}, "value2reason": {"High": "I'm very concerned about the kids getting dehydrated due to being outside playing all day. ", "Medium": "It's supposed to get very cold at night. I need to make sure I keep my family warm. ", "Low": "One of my kid's friends decided to join us last second. I'm worried we won't have enough food and he won't have fun."}, "outcomes": {"points_scored": 15, "satisfaction": "Slightly dissatisfied", "opponent_likeness": "Slightly dislike"}, "demographics": {"age": 26, "gender": "female", "ethnicity": "white american", "education": "master's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 3.0, "agreeableness": 6.0, "conscientiousness": 5.5, "emotional-stability": 5.0, "openness-to-experiences": 4.5}}}}, "annotations": []}, {"dialogue_id": 239, "chat_logs": [{"text": "hi", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Hello! I am excited about the trip but could use some more food just in case! Are you short on anything?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Yes,I also excited in the best trip.A very proposed in the food and case.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I could also use some water. Would you like to take 1 food, 2 water, and 2 firewood of the extra supplies?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "yes,A better thinking in the managed to the extra supplies.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Firewood is my lowest priority item since I think I brought plenty.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Ok,I lowest supplies in the firefood.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Ok, how about you take 2 firewood, 1 water, and 1 food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "A managed sharing in the better ideas.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Would you like to propose how you would like to split the supplies?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Ok, thank you", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "2", "Water": "2", "Firewood": "1"}, "issue2theyget": {"Food": "1", "Water": "1", "Firewood": "2"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_1": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "I like to the food item in chicken recipe because very hot in the taste. ", "Medium": "A water look like all participate in the days to drink.", "Low": "A cooking food simply and taste cooking in firefood."}, "outcomes": {"points_scored": 15, "satisfaction": "Extremely satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 30, "gender": "male", "ethnicity": "black or african american", "education": "master's degree"}, "personality": {"svo": "unclassified", "big-five": {"extraversion": 4.5, "agreeableness": 4.0, "conscientiousness": 3.5, "emotional-stability": 3.5, "openness-to-experiences": 4.5}}}, "mturk_agent_2": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "I am not sure I brought enough food for the whole trip.", "Medium": "I am worried because I left a couple of cases at home on accident.", "Low": "I wouldn't mind having some more firewood in case it gets cold at night."}, "outcomes": {"points_scored": 21, "satisfaction": "Extremely satisfied", "opponent_likeness": "Undecided"}, "demographics": {"age": 43, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.5, "agreeableness": 6.0, "conscientiousness": 7.0, "emotional-stability": 6.5, "openness-to-experiences": 4.0}}}}, "annotations": []}, {"dialogue_id": 850, "chat_logs": [{"text": "Hello", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Hello, how are you? ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Good, any particular item you're looking for?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "My highest need is more food. I am a diabetic and need to keep my blood sugar up. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Gotcha, we can work on that. Any interest in firewood as well?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Well I have interest in all of the items but food is most important. I would like some more wood as I am small and tend to get cold at night. What is your highest need item?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "My biggest need is water, it's going to be incredibly hot hot where I'm going so I'm looking for as much as possible. Also, hence the need for not a whole lot of firewood.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I have the least need for water so I'd be happy to give you the water and I'll take the wood if that's of no use to you.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That's perfect, I'd like 1 of the food if possible. However seems like you need the extra bag more than I do.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "That sounds like a good deal to me!", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Great so 3 waters to me, 3 firewood to you and 1 food for me, 2 for you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "2", "Firewood": "3", "Water": "0"}, "issue2theyget": {"Food": "1", "Firewood": "0", "Water": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_1": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "I need water as it's going to be very hot where I'm camping", "Medium": "I need food as my kids are going with me and they have large appetities", "Low": "I need firewood since the store was out and I wasn't able to chop my own."}, "outcomes": {"points_scored": 19, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 34, "gender": "male", "ethnicity": "white american", "education": "master's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 2.0, "agreeableness": 6.0, "conscientiousness": 6.0, "emotional-stability": 6.0, "openness-to-experiences": 4.0}}}, "mturk_agent_2": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "I am diabetic and need to keep my blood sugar up, especially since we'll be a distance from medical services.", "Medium": "I am very small and get very cold at night. I need the extra wood for warmth.", "Low": "I don't go through much water, so I think the normal amount would suffice for me. "}, "outcomes": {"points_scored": 22, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 36, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 2.5, "agreeableness": 6.5, "conscientiousness": 5.0, "emotional-stability": 5.0, "openness-to-experiences": 5.5}}}}, "annotations": []}, {"dialogue_id": 811, "chat_logs": [{"text": "Hi, how are you today?\ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I am well thanks. Waiting for the storm to pass.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Sorry to hear that, it's beautiful here.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "good for camping!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Exactly! I'm going to take advantage of the clear skies and get going- we're headed to a high altitude.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "What items are do you need most?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'm hoping for wood, then food- there's no brush and little to hunt where we're going. How about you?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I too was hoping for wood, less interested in food as we already have a lot. ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "So your second priority is water, then? ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "yes", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Well that works. I'd gladly give you the water if you'll give me the food. Then we would just need to decide who gets what firewood.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "How does 1 firewood, 3 food and 1 water sound? Or as an alternative 2 firewood 2 food and 0 water?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'd take 2 firewood, 2 food, and give you the rest if that's what you're suggesting! I can always melt snow haha", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "1", "Water": "3", "Food": "2"}, "issue2theyget": {"Firewood": "2", "Water": "0", "Food": "1"}}, "id": "mturk_agent_1"}, {"text": "Reject-Deal", "task_data": {"data": "reject_deal"}, "id": "mturk_agent_2"}, {"text": "I think we're confused, you said two firewood and two food for me and the rest for you, yes? Because that's not what was entered", "task_data": {}, "id": "mturk_agent_2"}, {"text": "\ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "2", "Food": "2", "Water": "0"}, "issue2theyget": {"Firewood": "1", "Food": "1", "Water": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "I am going to a high altitude where there is no brush to collect.", "Medium": "There is nothing to hunt at the altitude I am traveling to so I need to bring it with me.", "Low": "Since I'm going to a high altitude I can boil snow for water supply."}, "outcomes": {"points_scored": 18, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 29, "gender": "female", "ethnicity": "white american", "education": "master's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 3.0, "agreeableness": 4.5, "conscientiousness": 6.0, "emotional-stability": 3.5, "openness-to-experiences": 6.0}}}, "mturk_agent_1": {"value2issue": {"Low": "Food", "Medium": "Water", "High": "Firewood"}, "value2reason": {"High": "for light and cooking capabilities", "Medium": "it's very hot and staying hydrated is critical", "Low": "we will have brought our own food. More would be good but it is not vital"}, "outcomes": {"points_scored": 20, "satisfaction": "Slightly satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 65, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 1.5, "agreeableness": 5.5, "conscientiousness": 6.5, "emotional-stability": 6.5, "openness-to-experiences": 6.5}}}}, "annotations": []}, {"dialogue_id": 329, "chat_logs": [{"text": "I am afflicted with poor circulation and really need to stay warm. I need firewood badly", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Hi thats OK I didn't plan to start a fire. But I really need food. We are hungry", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I hear that. Well, I have plenty of food with me, and would be willing to offer all 3 food packages in exchange for the 3 firewoods. How does that sound to you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "That sounds great! We have lot beer but need some water. Can we compromise there too?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I think that we can agree on water as well. You sound like a person after my own heart, so how about the 3 food packs as well as 2 of the 3 waters? \ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Ya that works for me. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "It is always so great when everyone gets what they want and/or need, don't you think? I am so pleased to be negotiating with such an agreeable person!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Me too, this should be a great camping trip now. \ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I'll say!\ud83d\ude42 Maybe I'll have to come by to have a few of those beers with y'all!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Sounds great. I'll bring the supplies to you so we can make the trade now if that works for you.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Sounds like a plan! Let's do it.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "3", "Water": "2", "Firewood": "0"}, "issue2theyget": {"Food": "0", "Water": "1", "Firewood": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_1": {"value2issue": {"Low": "Food", "Medium": "Water", "High": "Firewood"}, "value2reason": {"High": "Poor circulation requires me to always keep my body, esp. my feet, warm or my health is in jeopardy", "Medium": "I am pre-diabetic and dehydrate exceptionally fast as compared to others.", "Low": "My pre-diabetic condition makes me susceptible to blood sugar crashes, and if I am unable to eat I can slip into a diabetic coma."}, "outcomes": {"points_scored": 19, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 28, "gender": "female", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.5, "agreeableness": 6.0, "conscientiousness": 5.0, "emotional-stability": 4.0, "openness-to-experiences": 5.5}}}, "mturk_agent_2": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "I am hungry and like to eat", "Medium": "We have lots of beer and don't want to get hungover", "Low": "It is warm out and dont plan on starting a fire"}, "outcomes": {"points_scored": 23, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 41, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 2.5, "agreeableness": 6.5, "conscientiousness": 6.5, "emotional-stability": 6.0, "openness-to-experiences": 5.0}}}}, "annotations": []}, {"dialogue_id": 352, "chat_logs": [{"text": "Hello, I hope you are well. I was hoping to get some packages from you. How does 3 packages of firewood, 2 packages of food, and 2 packages of water sound?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "That's a steep price. That you would give you 7 items and me only 4. I think we can work something out if you're willing to compromise though. Food is very important to me. If you are asking for 3 packages of firewood, I'd like 3 packages of food.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I'm not sure about that offer. I do need food as well, but water is not my number one priority. Would you be willing to give 3 packages of firewood, 1 package of food, and no water?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Let me consider. I miscalculated on my first statement - your initial offer would leave me with only 2(!) items. But this is more reasonable. I assume you value water the least?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Yes! Firewood is my top priority, along with food. What do you need most?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Food is highest, and a critical resource of course. \ud83d\ude42 Last time I went camping, some of it spoiled. Firewood is least of my concerns since it's very hot where I live right now, so I'm willing to let you have all 3 of that.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Awesome! Firewood is much needed because it gets very cold at night here.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "But you still need some food. You're asking me to give 1 package of food, 3 firewood, but no water? Does that offer still stand?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Yes, I think that will work in favor of us both. What do you think?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I think I can work with that. So, just to be sure we're on the same page, you will get 3 firewood, 1 food, 0 water. I will get 0 firewood, 2 food, 3 water.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Yes, that is the deal on the table.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "2", "Water": "3", "Firewood": "0"}, "issue2theyget": {"Food": "1", "Water": "0", "Firewood": "3"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_1": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "It gets very cold at night at I don't want to freeze while camping.", "Medium": "I want to have enough food to last the entire camping trip.", "Low": "Water is an survival necessity. "}, "outcomes": {"points_scored": 19, "satisfaction": "Slightly satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 24, "gender": "female", "ethnicity": "black or african american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.0, "agreeableness": 5.5, "conscientiousness": 6.5, "emotional-stability": 5.5, "openness-to-experiences": 6.0}}}, "mturk_agent_2": {"value2issue": {"High": "Food", "Medium": "Water", "Low": "Firewood"}, "value2reason": {"High": "It's a critical resource. Last time some of our food spoiled.", "Medium": "Water is a critical resource, but is usually available at campsites.", "Low": "It's the summer and very hot with no expectation of rain. Firewood isn't a priority."}, "outcomes": {"points_scored": 22, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 41, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, no degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 3.0, "agreeableness": 3.5, "conscientiousness": 4.0, "emotional-stability": 3.5, "openness-to-experiences": 5.0}}}}, "annotations": []}, {"dialogue_id": 445, "chat_logs": [{"text": "Hello! camper, how are you? I need us to make a deal where we all benefit.I'm so excited for our camping trip. I'm most excited about getting to eat food that I normally don't when I am home.\ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I am excited too and looking forward to making a deal that works well for both of us!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "My main objective for the camp is water, since I have a large family and the amount of water they give in the camp is very small for all my family.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I need water also but firewood is my second highest priority item. Maybe you could take more of the water and I could take more of the firewood.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I find it a good deal, however before making a deal, I like to talk to people, get to know them better. I plan to go to camp with my family: my wife, my four children and myself. Are you going with your family?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Yes, I am going with my wife and two teenage sons. We are planning on doing a lot of fishing!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "What do you think if in the camp we get together and have a meeting between your family and mine? We can have a small party to get to know each other better.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Sounds great!", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Ok, my proposal is to give you all the firewood you need, on the condition that you give me all the water I need. And regarding food we can negotiate.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "That sounds good. What do you propose on the food?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "My proposal is to give you 3 firewood, 2 food and 0 water. What do you think of the deal?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "0", "Firewood": "3", "Food": "2"}, "issue2theyget": {"Water": "3", "Firewood": "0", "Food": "1"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "I am diabetic and when I have high blood sugar I am dehydrated, that is why I need all the extra amounts of water to be free from concerns about dehydration. Also, it is currently very hot in the camp", "Medium": "I hope to spend an afternoon with my family in the camp, however, the amount of food they give us is not enough because we are a large family. So I need more food to feed my family at camp.", "Low": "My family and I plan to make food in the camp and it takes a lot of firewood to do it. That is why I need additional firewood to meet my family's food needs."}, "outcomes": {"points_scored": 19, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 38, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.0, "agreeableness": 5.0, "conscientiousness": 7.0, "emotional-stability": 6.5, "openness-to-experiences": 6.5}}}, "mturk_agent_1": {"value2issue": {"Low": "Food", "High": "Water", "Medium": "Firewood"}, "value2reason": {"High": "I thought I would be able to buy some on the way but was unable to.", "Medium": "I am worried the wood at the campsite will be wet.", "Low": "It would be nice to have some extra food in case I decide to stay an extra day."}, "outcomes": {"points_scored": 18, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 43, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.5, "agreeableness": 6.0, "conscientiousness": 7.0, "emotional-stability": 6.5, "openness-to-experiences": 4.0}}}}, "annotations": [["Hello! camper, how are you? I need us to make a deal where we all benefit.I'm so excited for our camping trip. I'm most excited about getting to eat food that I normally don't when I am home.\ud83d\ude42", "small-talk,vouch-fair,promote-coordination,self-need"], ["I am excited too and looking forward to making a deal that works well for both of us!", "small-talk"], ["My main objective for the camp is water, since I have a large family and the amount of water they give in the camp is very small for all my family.", "other-need,self-need"], ["I need water also but firewood is my second highest priority item. Maybe you could take more of the water and I could take more of the firewood.", "vouch-fair"], ["I find it a good deal, however before making a deal, I like to talk to people, get to know them better. I plan to go to camp with my family: my wife, my four children and myself. Are you going with your family?", "small-talk"], ["Yes, I am going with my wife and two teenage sons. We are planning on doing a lot of fishing!", "small-talk"], ["What do you think if in the camp we get together and have a meeting between your family and mine? We can have a small party to get to know each other better.", "small-talk"], ["Sounds great!", "small-talk"], ["Ok, my proposal is to give you all the firewood you need, on the condition that you give me all the water I need. And regarding food we can negotiate.", "promote-coordination"], ["That sounds good. What do you propose on the food?", "non-strategic"], ["My proposal is to give you 3 firewood, 2 food and 0 water. What do you think of the deal?", "non-strategic"]]}, {"dialogue_id": 900, "chat_logs": [{"text": "Hello! I'm excited to go camping. How about you>", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Yeah, I love to camp! :D", "task_data": {}, "id": "mturk_agent_2"}, {"text": "\ud83d\ude42 What supplies do you need most?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I need water the most, food the least, how bout you?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I need food the most and firewood the least.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I gotcha. We could work out a good deal then ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Yeah should be easy. My food problem is because my son eats like 5000 calories a day.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "ooof, growing kids, I know what you are saying!", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Okay, so let's see. How about food (2 me 1 you), water (2 you 1 me), and firewood (2 me 1 you)?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "hmmm, Can I have 3 things of water, you can have all the food and I get 2 fire wood, you get 1 fire wood? So I get 3 water, 2 fire wood, and 0 food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Switch the firewood allotment and you got a deal.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Sounds fine to me! \ud83d\ude42", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "3", "Firewood": "2", "Water": "0"}, "issue2theyget": {"Food": "0", "Firewood": "1", "Water": "3"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_1": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "My teenage son is growing and always hungry.", "Medium": "My wife is often cold at night.", "Low": "I brought plenty of water."}, "outcomes": {"points_scored": 23, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 49, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 6.5, "agreeableness": 5.5, "conscientiousness": 6.5, "emotional-stability": 6.5, "openness-to-experiences": 6.5}}}, "mturk_agent_2": {"value2issue": {"Low": "Food", "High": "Water", "Medium": "Firewood"}, "value2reason": {"High": "Water is hard to come by when camping", "Medium": "I need to keep warm and keep the fire going to keep animals away", "Low": "We can hunt and fish for food when camping."}, "outcomes": {"points_scored": 19, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 33, "gender": "male", "ethnicity": "white american", "education": "some 2 year college, associate's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 3.5, "agreeableness": 4.0, "conscientiousness": 6.5, "emotional-stability": 7.0, "openness-to-experiences": 3.5}}}}, "annotations": []}, {"dialogue_id": 139, "chat_logs": [{"text": "Hi, I hope we can work together to get an offer that benefits both of us.\ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I agree! Nice to meet you... I have two boys who always eat! Any chance I canget 2 food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Food is the item of greatest value to you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "It is! What do you think?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "The item of greatest value to me is WATER. Before thinking about an offer I need to know what your priorities are and you need to know mine in order to conclude something fair for both of you.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "My priority is FOOD. How about I get 3 food and you get 3 water?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "What is the least valuable item for you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "least for me is water", "task_data": {}, "id": "mturk_agent_2"}, {"text": "For me is the firewood, Lets do this: I give u 2 food 1 water and 1 firewood. and i get 2 waters 1 food and 2 firewood", "task_data": {}, "id": "mturk_agent_1"}, {"text": "sounds good", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "2", "Food": "1", "Firewood": "2"}, "issue2theyget": {"Water": "1", "Food": "2", "Firewood": "1"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_1": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "I need water since hydration is very important for me", "Medium": "I need food because nutrients are necessary to be healthy", "Low": "I don't need firewood because i can get it at the camp"}, "outcomes": {"points_scored": 20, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 25, "gender": "male", "ethnicity": "hispanic or latino", "education": "some 2 year college, no degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 5.5, "agreeableness": 5.0, "conscientiousness": 5.5, "emotional-stability": 4.5, "openness-to-experiences": 3.5}}}, "mturk_agent_2": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "I need food in case my basic supply runs low or spoils", "Medium": "I need firewood for warmth, cooking and seeing at night", "Low": "I need extra water to hydrate"}, "outcomes": {"points_scored": 17, "satisfaction": "Slightly dissatisfied", "opponent_likeness": "Undecided"}, "demographics": {"age": 39, "gender": "female", "ethnicity": "asian american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 5.5, "agreeableness": 7.0, "conscientiousness": 7.0, "emotional-stability": 6.5, "openness-to-experiences": 5.0}}}}, "annotations": [["Hi, I hope we can work together to get an offer that benefits both of us.\ud83d\ude42", "promote-coordination,vouch-fair"], ["I agree! Nice to meet you... I have two boys who always eat! Any chance I canget 2 food?", "small-talk,other-need"], ["Food is the item of greatest value to you?", "elicit-pref"], ["It is! What do you think?", "elicit-pref"], ["The item of greatest value to me is WATER. Before thinking about an offer I need to know what your priorities are and you need to know mine in order to conclude something fair for both of you.", "self-need,elicit-pref,vouch-fair"], ["My priority is FOOD. How about I get 3 food and you get 3 water?", "non-strategic"], ["What is the least valuable item for you?", "elicit-pref"], ["least for me is water", "non-strategic"], ["For me is the firewood, Lets do this: I give u 2 food 1 water and 1 firewood. and i get 2 waters 1 food and 2 firewood", "non-strategic"], ["sounds good", "non-strategic"]]}, {"dialogue_id": 572, "chat_logs": [{"text": "Hi, ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Hello. What sort of supplies are you looking for?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Well, I really dislike camping :( and am looking to make the trip as comforting as possible. I would like to gather 2 food, 2 firewood and 2 water please. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I need a lot of food and I get cold easily. What is your top priority?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Food is comforting to me so I would like to have plenty of food on hand to eat during this dreadful trip. I will need plenty of fire wood to cook it, but am not as worried about the water. ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I need a lot of food as well but I'm willing to sacrifice it if I get all the firewood and water.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Thank you. WOuld you be willing to give me all the food? I would give you all the water and 2 firewood.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I can give you all the food and 1 water. I get all firewood and 2 water.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I need at least one firewood to cook my food. Can you give me one firewood for all the water?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I'm sorry. I won't be able to do that.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "SO you will give me 3 food, no firewood and 2 water?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Because I get cold easily and need water for cleaning, my final offer is 3 food/1 water for you and 3 firewood/2 water for me. Because I'm not getting any food, anything less, I cannot do.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Food": "3", "Firewood": "0", "Water": "1"}, "issue2theyget": {"Food": "0", "Firewood": "3", "Water": "2"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "I will be working very hard and will be very hungry durin this camping trip> ", "Medium": "It is important to have a fire to enjoy the trip and make some yummy camp food.", "Low": "It is hot and I need to make sure to drink plenty of water to stay hydrated."}, "outcomes": {"points_scored": 18, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 36, "gender": "female", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 1.5, "agreeableness": 6.5, "conscientiousness": 5.0, "emotional-stability": 6.0, "openness-to-experiences": 6.0}}}, "mturk_agent_1": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "I have a bigger appetite and need more food.", "Medium": "I get cold easily so I need extra firewood.", "Low": "I need extra water to cook and bathe."}, "outcomes": {"points_scored": 18, "satisfaction": "Undecided", "opponent_likeness": "Slightly dislike"}, "demographics": {"age": 29, "gender": "female", "ethnicity": "native hawaiian or other specific islander", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 4.0, "agreeableness": 5.5, "conscientiousness": 6.0, "emotional-stability": 4.0, "openness-to-experiences": 5.5}}}}, "annotations": [["Hi, ", "non-strategic"], ["Hello. What sort of supplies are you looking for?", "elicit-pref"], ["Well, I really dislike camping :( and am looking to make the trip as comforting as possible. I would like to gather 2 food, 2 firewood and 2 water please. ", "small-talk"], ["I need a lot of food and I get cold easily. What is your top priority?", "self-need,elicit-pref"], ["Food is comforting to me so I would like to have plenty of food on hand to eat during this dreadful trip. I will need plenty of fire wood to cook it, but am not as worried about the water. ", "self-need"], ["I need a lot of food as well but I'm willing to sacrifice it if I get all the firewood and water.", "promote-coordination"], ["Thank you. WOuld you be willing to give me all the food? I would give you all the water and 2 firewood.", "promote-coordination"], ["I can give you all the food and 1 water. I get all firewood and 2 water.", "non-strategic"], ["I need at least one firewood to cook my food. Can you give me one firewood for all the water?", "promote-coordination"], ["I'm sorry. I won't be able to do that.", "vouch-fair"], ["SO you will give me 3 food, no firewood and 2 water?", "non-strategic"], ["Because I get cold easily and need water for cleaning, my final offer is 3 food/1 water for you and 3 firewood/2 water for me. Because I'm not getting any food, anything less, I cannot do.", "self-need,vouch-fair"]]}, {"dialogue_id": 741, "chat_logs": [{"text": "HI ARE YOU READY TO GO CAMPING? ARE YOU GOING ALONE WE ARE TAKING THE BABY", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Actually, we're a group. The husband and I have our two and my sister's two, quite the PARTY \ud83d\ude42 How old is your baby?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "SHE IS JUST ABOUT A YEAR OLD HOW OLD ARE YOURS?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "A twelve year old girl, two ten year old boys and a five year old boy. You can imagine what it's going to take to feed this crew.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "god bless you LOL if you give me water i can give you some food.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Totally fair, another concern is Bonnie, the twelve year old, her sleeping bag is NOT GOOD and I'm afraid we don't have enough firewood to make it through the night. Quite frankly, she's ALREADY complaining.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "so i am porposing you give me 3 water 0 food 1 wood ", "task_data": {}, "id": "mturk_agent_2"}, {"text": "You are a God Send!! I think that will work perfect! Is your daughter walking yet?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "yes she is a little not very safe but getting there", "task_data": {}, "id": "mturk_agent_2"}, {"text": "It's wonderful you're taking her out to enjoy camping. I hope she doesn't keep you up, sleeping in a new place and all.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Water": "3", "Food": "0", "Firewood": "1"}, "issue2theyget": {"Water": "0", "Food": "3", "Firewood": "2"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_2": {"value2issue": {"Medium": "Food", "High": "Water", "Low": "Firewood"}, "value2reason": {"High": "TRAVELING WITH BABAY NEED EXTRA WATER FOR FORMULA", "Medium": "BABY NEEDS TO EAT SO EXTRA FOOD IS ALWAYS GOOD", "Low": "ITS SUMMER WARM SUMMER NIGHTS"}, "outcomes": {"points_scored": 18, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 55, "gender": "female", "ethnicity": "white american", "education": "some 2 year college, associate's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 4.0, "agreeableness": 6.5, "conscientiousness": 5.5, "emotional-stability": 7.0, "openness-to-experiences": 5.0}}}, "mturk_agent_1": {"value2issue": {"High": "Food", "Low": "Water", "Medium": "Firewood"}, "value2reason": {"High": "We were in a hurry to arrive and didn't stop for lunch.", "Medium": "It might get cold tonight and our sleeping bags are not well rated.", "Low": "I want to make coffee in the morning."}, "outcomes": {"points_scored": 23, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 49, "gender": "female", "ethnicity": "white american", "education": "high school graduate / ged"}, "personality": {"svo": "proself", "big-five": {"extraversion": 6.5, "agreeableness": 6.0, "conscientiousness": 4.5, "emotional-stability": 4.5, "openness-to-experiences": 5.5}}}}, "annotations": []}, {"dialogue_id": 861, "chat_logs": [{"text": "Hello, how are you doing? \ud83d\ude42", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Good, how are you?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I am great! What item is most important to you to get?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'm most interested in firewood. How about you?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I am also most interested in the firewood. I need it to keep my new baby warm. ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I understand. Being cold while camping can make for a long miserable trip. What are you least interested in?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I am least interested in the water, I have plenty of that already. What about you?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'm planning on fishing for food, so I'm least interested in food", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Oh that makes sense. How clever of you to fish! Well you can have all 3 of my waters if I can have 2 of the firewood and 2 of the food.", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Seems reasonable, would you be interested in substituting 1 more firewood for me and you could have all 3 of the food?", "task_data": {}, "id": "mturk_agent_2"}, {"text": "I wish I could but I really need to keep my little guy warm, he's only 4 months old! ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "1", "Water": "3", "Food": "1"}, "issue2theyget": {"Firewood": "2", "Water": "0", "Food": "2"}}, "id": "mturk_agent_2"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_1"}], "participant_info": {"mturk_agent_1": {"value2issue": {"Medium": "Food", "Low": "Water", "High": "Firewood"}, "value2reason": {"High": "I need to keep my new baby warm. ", "Medium": "I need to be sure I stay nourished. ", "Low": "I am good at rationing out water so I don't need as much."}, "outcomes": {"points_scored": 18, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 39, "gender": "female", "ethnicity": "white american", "education": "master's degree"}, "personality": {"svo": "proself", "big-five": {"extraversion": 6.0, "agreeableness": 6.0, "conscientiousness": 7.0, "emotional-stability": 6.5, "openness-to-experiences": 2.5}}}, "mturk_agent_2": {"value2issue": {"Low": "Food", "Medium": "Water", "High": "Firewood"}, "value2reason": {"High": "Fire is essential for cooking, sanitizing and keeping warm.", "Medium": "Water is necessary, but I can always find water and sanitize it as long as I have fire", "Low": "Food is important, but I love to fish and am planning on spending time catching my own food."}, "outcomes": {"points_scored": 20, "satisfaction": "Slightly satisfied", "opponent_likeness": "Slightly like"}, "demographics": {"age": 42, "gender": "male", "ethnicity": "white american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 3.0, "agreeableness": 5.0, "conscientiousness": 4.5, "emotional-stability": 5.0, "openness-to-experiences": 4.0}}}}, "annotations": []}, {"dialogue_id": 683, "chat_logs": [{"text": "Hello, I was hoping I could take some water and firewood", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Hi, I willing to offer food and fire for more water.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Would you be willing to let me have all the firewood?", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Yes", "task_data": {}, "id": "mturk_agent_2"}, {"text": "how about this, 3 firewood and 2 food, for me. 3 Water and 1 food for you? ", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I'm okay with that offer.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Sounds good then, what did you need the water for if you dont mind me asking", "task_data": {}, "id": "mturk_agent_1"}, {"text": "I have a pet dog that will join me on the trip. So i definitely could use all the water i can get.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Cool makes sense. So we have a deal then", "task_data": {}, "id": "mturk_agent_1"}, {"text": "Yep! I get three water and one food item.", "task_data": {}, "id": "mturk_agent_2"}, {"text": "Submit-Deal", "task_data": {"issue2youget": {"Firewood": "3", "Water": "0", "Food": "2"}, "issue2theyget": {"Firewood": "0", "Water": "3", "Food": "1"}}, "id": "mturk_agent_1"}, {"text": "Accept-Deal", "task_data": {"data": "accept_deal"}, "id": "mturk_agent_2"}], "participant_info": {"mturk_agent_1": {"value2issue": {"Low": "Food", "Medium": "Water", "High": "Firewood"}, "value2reason": {"High": "We want to have a big Fire", "Medium": "Its hot today and we need to stay hydrated", "Low": "There's not a lot of us so we have plenty of food."}, "outcomes": {"points_scored": 21, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 31, "gender": "male", "ethnicity": "black or african american", "education": "some 4 year college, bachelor's degree"}, "personality": {"svo": "prosocial", "big-five": {"extraversion": 3.0, "agreeableness": 4.0, "conscientiousness": 5.0, "emotional-stability": 6.0, "openness-to-experiences": 5.0}}}, "mturk_agent_2": {"value2issue": {"Low": "Food", "High": "Water", "Medium": "Firewood"}, "value2reason": {"High": "Water is needed as i will bring my pet dog with me on the trip.", "Medium": "Firewood is need to keep the bugs away all night.", "Low": "Food is needed for my pet dog."}, "outcomes": {"points_scored": 18, "satisfaction": "Extremely satisfied", "opponent_likeness": "Extremely like"}, "demographics": {"age": 35, "gender": "male", "ethnicity": "black or african american", "education": "high school graduate / ged"}, "personality": {"svo": "proself", "big-five": {"extraversion": 1.0, "agreeableness": 5.0, "conscientiousness": 6.5, "emotional-stability": 6.5, "openness-to-experiences": 5.5}}}}, "annotations": []}] --------------------------------------------------------------------------------