shanive / bgu-ailab-bandits

bandits expiriment
6 stars 0 forks source link

refactor module names #26

Closed dtolpin closed 13 years ago

dtolpin commented 13 years ago

Module names must be refactored. Now all module names start with sos, which is unnecessary, since the package name is already SOS. Besides that, the names are not informative and sometimes misleading.

sos' contains the model, or the mechanism of the game. I suggest a name likemodel (or mechanism') sosAgents' becomes `agents', trivially.

SOSGame, the game simulator, is actually a part of the model. I suggest removing method initialState from model.Game and adding method play, with two players.

class Game: ... def play(self, firstplayer, secondplayer): .....

module sosTest' is a partial case of a tournament, with two players; becomestournament' and must be extended/modified for multiple players.

Useful git commands are

git mv git rm


so, after refactoring, we will have something like

SOS/model.py --- game model: the rules and the state. SOS/agents.py --- agent implementations. SOS/tournament.py --- playing games and gathering statistics.

I suggest adding, for testing purposes, also SOS/play.py, a simplified version of the tournament, like the current sosTest.py, but even simpler: one fixed value of n. Just to check quickly that the agents behave as expected.

dtolpin commented 13 years ago

assigned to @shanive