Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
frangente committed Feb 3, 2024
1 parent 4704909 commit 28f7ca6
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 2 deletions.
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
# deliveroo
<div align="center">

# DELIVEROO

<h4>Project for the "Autonomous Software Agents" course 2023</h4>

</div>


## How to run the project

To install the project, first clone the repository and then run the following commands:

```bash
# Clone the repository
git clone https://github.com/FrancescoGentile/deliveroo.git

# Move to the project directory
cd deliveroo

# Install the dependencies
pnpm install
# or (if you prefer npm)
npm install
```

Then, to run the project, you can use the following commands:

```bash
# First transpile the TypeScript files to JavaScript
pnpm build
# or (if you prefer npm)
npm run build

# Then run the project
pnpm start
# or (if you prefer npm)
npm start
```

Or, if you prefer, you can use the following command to transpile the TypeScript files and run the project in one step:

```bash
pnpm start:dev
# or (if you prefer npm)
npm run start:dev
```

### Configuration

To run the project, you need to set some parameters that are used to configure the agents and the environment. You can provide such parameters as environment variables (also using a `.env` file) or as command line arguments (the latter will override the former).

The list of the parameters that you can set is the following (the environment variable name is in parentheses):

- `host` (`HOST`): the host (in the form `http://<host>:<port>`) of the server running the environment
- `token` (`TOKEN`): the token used to identify the agent
- `secret-key` (`SECRET_KEY`): the secret key used to cypher and decypher the `hello` messages exchanged between the agents
- `secret-seed` (`SECRET_SEED`): the secret seed used to seed the random number generator used to generate the inizialization vector of the cypher
- `hello-interval` (`HELLO_INTERVAL`): the interval (in milliseconds) at which the agent sends the `hello` message to the other agents (default: 2000)
- `max-last-heard` (`MAX_LAST_HEARD`): the maximum time (in milliseconds) that can pass without hearing from a team mate before considering it as dead (default: 6000)
- `start-iterations` (`START_ITERATIONS`): the number of Monte Carlo iterations to perform before starting the agent (default: 10)
- `num-promising-positions` (`NUM_PROMISING_POSITIONS`): the number of promising positions to consider when choosing the next move intention (default: 5)
- `gaussian-std` (`GAUSSIAN_STD`): the standard deviation of the Gaussian distribution used to generate the expected value of a tile (default: 1.0)
- `discount-factor` (`DISCOUNT_FACTOR`): the discount factor used to discount the values of the parcels picked by other team mates (default: 0.1)

Parameters `host`, `token`, `secret-key`, and `secret-seed` are mandatory. The other parameters will be set to the default values if not provided.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"build": "tsc && babel tmp_dist -d dist && rm -rf tmp_dist",
"start": "node --experimental-loader=extensionless dist/index.js",
"dev-start": "tsc && babel tmp_dist -d dist && rm -rf tmp_dist && node --experimental-loader=extensionless dist/index.js",
"start:dev": "tsc && babel tmp_dist -d dist && rm -rf tmp_dist && node --experimental-loader=extensionless dist/index.js",
"pre-commit": "biome ci src/",
"prepare": "husky install",
"fix": "biome check --apply src/"
Expand Down

0 comments on commit 28f7ca6

Please sign in to comment.