Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Minecraft Virtual Intelligence
# MineAgent

Welcome! This is a package intended for research into virtual intelligence in Minecraft.

Expand Down Expand Up @@ -37,8 +37,8 @@ pixi install
If you want to a conda environment you can install like so:

```bash
conda create -n mvi python=3.11
conda activate mvi
conda create -n mineagent python=3.11
conda activate mineagent
pip install .

# Install custom MineDojo fork
Expand All @@ -52,23 +52,23 @@ cd ..

## Running the project

To run the project, you can use the `mvi` command.
To run the project, you can use the `mineagent` command.

Either using Pixi:

```bash
pixi run mvi
pixi run mineagent
```

Or if you installed with conda or venv:

```bash
mvi
mineagent
```

This will start the project and you can use the `mvi` command to run the project starting from the `engine.run` function.
This will start the project and you can use the `mineagent` command to run the project starting from the `engine.run` function.

To view a list of all the commands you can use, run `mvi --help`.
To view a list of all the commands you can use, run `mineagent --help`.

## Technologies

Expand Down
6 changes: 3 additions & 3 deletions forge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ mapping_version=1.21.5

# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
# Must match the String constant located in the main mod class annotated with @Mod.
mod_id=mvi
mod_id=mineagent
# The human-readable display name for the mod.
mod_name=Minecraft Virtual Intelligence Mod
mod_name=MineAgent Mod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT
# The mod version. See https://semver.org/
mod_version=0.0.1
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
mod_group_id=com.mvi.mvimod
mod_group_id=com.mineagent
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=Thomas Hopkins
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mvi.mvimod;
package com.mineagent;

import com.mojang.blaze3d.platform.Window;
import com.mojang.logging.LogUtils;
Expand All @@ -20,12 +20,12 @@ public class ClientEventHandler {

@SubscribeEvent
public static void onServerStarting(ServerStartingEvent event) {
LOGGER.info("MVI Mod Server Starting - Network handler is managed on client side");
LOGGER.info("MineAgent Mod Server Starting - Network handler is managed on client side");
}

@SubscribeEvent
public static void onServerStopping(ServerStoppingEvent event) {
LOGGER.info("MVI Mod Server Stopping");
LOGGER.info("MineAgent Mod Server Stopping");
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.mvi.mvimod;
package com.mineagent;

import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(modid = MviMod.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
@Mod.EventBusSubscriber(modid = MineAgentMod.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class Config {

// Configuration Builder
Expand All @@ -29,11 +29,11 @@ public class Config {

READ_PORT =
BUILDER
.comment("Port for reading data from MVI client")
.comment("Port for reading data from MineAgent client")
.defineInRange("read_port", 12345, 1024, 65535);
WRITE_PORT =
BUILDER
.comment("Port for sending data to MVI client")
.comment("Port for sending data to MineAgent client")
.defineInRange("write_port", 12346, 1024, 65535);

BUILDER.pop();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mvi.mvimod;
package com.mineagent;

import com.mojang.logging.LogUtils;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mvi.mvimod;
package com.mineagent;

import com.mojang.blaze3d.platform.Window;
import com.mojang.logging.LogUtils;
Expand All @@ -14,16 +14,16 @@
import org.slf4j.Logger;

// The value here should match an entry in the META-INF/mods.toml file
@Mod(MviMod.MODID)
public class MviMod {
@Mod(MineAgentMod.MODID)
public class MineAgentMod {
// Define mod id in a common place for everything to reference
public static final String MODID = "mvi";
public static final String MODID = "mineagent";
// Directly reference a slf4j logger
private static final Logger LOGGER = LogUtils.getLogger();

private static Thread networkThread;

public MviMod(FMLJavaModLoadingContext context) {
public MineAgentMod(FMLJavaModLoadingContext context) {
// Register client event handler
MinecraftForge.EVENT_BUS.register(ClientEventHandler.class);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mvi.mvimod;
package com.mineagent;

import com.mojang.logging.LogUtils;
import java.io.BufferedReader;
Expand All @@ -23,8 +23,8 @@

public class NetworkHandler implements Runnable {
private static final Logger LOGGER = LogUtils.getLogger();
private static final String SEND_SOCKET_PATH = "/tmp/mvi_send.sock";
private static final String RECEIVE_SOCKET_PATH = "/tmp/mvi_receive.sock";
private static final String SEND_SOCKET_PATH = "/tmp/mineagent_send.sock";
private static final String RECEIVE_SOCKET_PATH = "/tmp/mineagent_receive.sock";
private static final ExecutorService senderExecutor = Executors.newCachedThreadPool();
private static final ExecutorService receiverExecutor = Executors.newCachedThreadPool();
private Thread sendThread;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion mvi/config.py → mineagent/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def get_config() -> Config:
def parse_arguments() -> argparse.Namespace:
"""Parse command-line arguments"""
parser = argparse.ArgumentParser(
description="Specify arguments for running Minecraft Virtual Intelligence"
description="Specify arguments for running MineAgent"
)
parser.add_argument(
"-f",
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions mvi/env.py → mineagent/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
class ConnectionConfig:
"""Configuration for Minecraft Forge mod connection"""

command_port: str = "/tmp/mvi_receive.sock"
data_port: str = "/tmp/mvi_send.sock"
command_port: str = "/tmp/mineagent_receive.sock"
data_port: str = "/tmp/mineagent_send.sock"
width: int = 320
height: int = 240
timeout: float = 30.0
Expand Down Expand Up @@ -403,7 +403,7 @@ def create_minecraft_env(
Parameters
----------
config : Config | None
MVI configuration object
MineAgent configuration object
connection_config : ConnectionConfig | None
Connection configuration for the Minecraft mod

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions mvi/learning/icm.py → mineagent/learning/icm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import torch.nn.functional as F
import torch.optim as optim

from mvi.memory.trajectory import TrajectoryBuffer
from mvi.config import ICMConfig
from mineagent.memory.trajectory import TrajectoryBuffer
from mineagent.config import ICMConfig


@dataclass
Expand Down
6 changes: 3 additions & 3 deletions mvi/learning/ppo.py → mineagent/learning/ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import torch.nn.functional as F
import torch.optim as optim

from mvi.utils import joint_logp_action, discount_cumsum
from mvi.config import PPOConfig
from mvi.memory.trajectory import TrajectoryBuffer
from mineagent.utils import joint_logp_action, discount_cumsum
from mineagent.config import PPOConfig
from mineagent.memory.trajectory import TrajectoryBuffer


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion mvi/learning/td.py → mineagent/learning/td.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import torch
import torch.nn as nn

from mvi.config import TDConfig
from mineagent.config import TDConfig


class TemporalDifferenceActorCritic:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
70 changes: 35 additions & 35 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading