| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
- src/NameGame.cc: remove std::map best_move implementation.
- add explicit confirmation bias macro.
- add default random tie-breaker.
- src/many-async.cc: reseed for each committed minority value because
entropy may be exhausted.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
| |
- src/NameGame.cc (run): count last N uncommitted strategies and report
that instead of the last N strategies.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
| |
- src/many-async.cc: leverage std::async to run concurrent experiments.
- CMakeLists.txt: add memory list option and make it default to ON.
- src/CMakeLists.txt: make the NameGame.cc into a library now that it's
being used by three different executables.
- add compile definition with tipping points cmake option.
- add many-async executable.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
| |
- src/NameGame.cc: explicit instantiation of copy assignment operator to
avoid over-optimization removing the function.
- (update_memory): use TVec DelLast instead of Trunc which calls
realloc. This is a little bit faster but still doesn't beat TLst.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- src/NameGame.h: update network to use linked list for memory (given
macro). seems to provide ~2x speedup.
- src/NameGame.cc: add iterator for TLst type.
- add copy constructor and copy assignment operator for TLst that are
not defined by the SNAP library.
- add TP_BESTMOVE_STATIC to use static array for voting to speed up
best_move by ~2x.
- add conditional logic in places to allow for A/B testing.
- based off testing I can get ~4x total improvement so I think I will
make both of these permanent (except maybe leaving in the old
unoptimized code in case I want to add multiple strategies).
- TASKS.md: update tasks.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
| |
- src/NameGame.cc: add static weight function that memoizes exp for
different weight lengths.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
| |
- src/main.cc: remove file.
- src/one.cc: add executable to do a single game run and write the
strategy record.
- src/many.cc: add executable to run many trials at each minority size.
- write adoption amount.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
| |
- src/main.cc: run only one game with prescribed settings and output the
number of new strategy plays.
- src/NameGame.h: change NameGame::run to return an int which is the
number of non-committed players that changed their mind.
- src/NameGame.cc (run): do not display average for brevity.
- output the uncommitted new strategy plays.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
| |
- src/NameGame.cc: replace faulty fraction accounting with simple
std::max_element.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
| |
- TASKS.md: add coding tasks.
- src/main.cc: increase group size to 1000 like in paper.
- set memory length explicitly
- run for T*group size where T=1000.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
| |
- src/NameGame.cc (NameGame::runRound): shorten output.
- make line lengths the same so it's easier to see.
- output hearer info again.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
| |
- src/NameGame.cc (NameGame::update_memory): fixed update_memory not
updating memory vectors.
- needed to get reference to node data.
- shortened update sequence and avoided using another auto reference.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- src/NameGame.cc (runRound): fixed code so that only speaker chooses a
strategy each round. this matches BestResponseNameGame.R
- renamed variables to just strategy.
- updated record call.
- (run): updated average calculation per round.
- (writeRecord): updated header and row code.
- src/NameGame.h: updated Record struct to remove hearer info.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- src/NameGame.h: add append option to writeRecord to allow updating one
big CSV file.
- add speaker and hearer type (i.e. committed) to CSV file.
- src/NameGame.cc (initMemory): change answers to biunit i.e. -1 and 1
for easier analysis.
- (runRound): write speaker/hearer type.
- (writeRecord): add append mode to allow updating a single CSV file.
- had to change to fstream with in/out because using an ofstream always
overwrote the file.
- only write the header line when at the beginning of the file.
- add speaker/hearer type.
- src/main.cc: clear record again in each loop and go into append mode
for every iteration after the first one.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- src/NameGame.h: replace tuple in strategy_record with private struct.
- src/NameGame.cc (runRound): add round number so it can be written to the
strategy record.
- change record update for struct and add round number.
- use push_back and initializer list.
- (run): does not assume record is empty when calculating average.
- call runRound with round number.
- use struct instead of tuple.
- (writeRecord): write NameGame parameters and round number as well.
- src/main.cc: don't clear record and write entire record to file.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- src/NameGame.h: add strategy record as vector of tuples.
- src/NameGame.cc (runRound): remove each round printout but update the
strategy record.
- fix speaker memory update.
- (clearRecord): add function.
- (writeRecord): add function to output CSV file with record info.
- (NameGame::run): print average strategy.
- src/main.cc: clear memory and run 1000 rounds.
- TASKS.md: update tasks
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- src/CMakeLists.txt: add NameGame.cc.
- src/NameGame.cc: move best_move, update_memory, run round, round into this
class and file.
- move begin/end for TVec here.
- add initGraph and initMemory for changing sizes.
- src/NameGame.h: add class declaration.
- main.cc: move all functions out of here.
- use one object and re initialize memory for different committed minority
sizes.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
| |
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
|
| |
- main.cc (main): add experimental group size variable.
- (name_game): construct complete graph with some commited minority.
- add comments for other steps.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
| |
|
|
|
|
|
| |
- cmake/GetSNAP.cmake: add include directory to imported target.
- src/main.cc: include SNAP and simple graph.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|
|
|
- cmake/GetSNAP.cmake: add module that uses ExternalProject to download and
build (with make) the SNAP library.
- CMakeLists.txt: simple cmake file to use the GetSNAP module.
- src/main.cc: simples possible main file.
- src/CMakeLists.txt: simple cmake file with main executable and linking.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
|