cabaletta / baritone

google maps for block game
GNU Lesser General Public License v3.0
7.19k stars 1.44k forks source link

Bit of a question, what's this news about a combat-oriented version of baritone? #792

Closed BlueCyro closed 5 years ago

BlueCyro commented 5 years ago

I just watched a video from FitMC about people getting massacred by a coordinated bot swarm powered by baritone, wherein a player was lured by a bot and keeping distance while it called for reinforcements, then a swarm appeared and proceeded to massacre the player.

I also heard that a ton more stuff is automated by machine-learning in the combat version and being developed in a private repository. Is any of this stuff true? And if so, will it ever be released? I'm extremely intrigued because I don't hear this being talked about anywhere else.

neverix commented 5 years ago

@c0nn3r confirm or deny?

Hyyeve commented 5 years ago

I wondered, and indeed hoped, that this would happen when I first discovered baritone. I'm just a little wary of it being private, because there's a few ways it could go from here. Either, it remains private and becomes a monopoly, with nobody being able to match the AI, or it becomes public and suddenly everyone has access to overpowered AI, potentially leading to huge changes in server policies.

neverix commented 5 years ago

I'll try to write an email to Conner and ask him if it's true.

His commit history does show some contributions to a private repository, so I think it could be real.

Hyyeve commented 5 years ago

I hope it's real, I just hope that it doesn't stay private and turn into a sorta "minecraft robot overlord" situation.

neverix commented 5 years ago

Don't worry, the development of this combat update seems to have happened in one day. I'm sure somebody could replicate without much effort.

Hyyeve commented 5 years ago

Perhaps. Though, implementing neural nets that he'd already developed would be easy - and not easy to replicate. I guess we'll just have to wait and see where it goes from here.

bddvlpr commented 5 years ago

https://github.com/cabaletta/baritone/tree/bot-system but outdated

Spzatak commented 5 years ago

oh boy, oh boy.

neverix commented 5 years ago

It's currently 2AM for Conner. I think it's best to wait until he responds.

Hyyeve commented 5 years ago

Yeah probably.

bddvlpr commented 5 years ago

The branch is really outdated and probably won’t be updated any time soon. Brady maintained the branch for a while.

neverix commented 5 years ago

I'm pretty sure everyone here is talking about a "private fork", as stated in the video.

bddvlpr commented 5 years ago

Then you shouldn’t be looking here?

neverix commented 5 years ago

Yea not sure why the issue is here

neverix commented 5 years ago

Anyway this issue is visible to people who are confused wtf is going on so I IMO it can reopened

Otherwise people will start spamming issues which is Not Good ™

bddvlpr commented 5 years ago

“Now as of right now, that fork is still private” -FitMC

neverix commented 5 years ago

I'm not saying that it isn't, it's just that this issue could serve as a place for public discussion of the fork because there aren't any others that I know of.

bddvlpr commented 5 years ago

You can still comment while the issue is closed. Plus, even if it is shown on the main “issues” page, retards people will still create new issues for it.

neverix commented 5 years ago

Nice edit there, thought I was mentally rarted for a sec

BlueCyro commented 5 years ago

Woah this kinda blew up, wasn't expecting that, lol. Yeah, I suppose it's not hard to automate baritone even if you only kinda-sorta know what you're doing. All you really need are some bot accounts and what is essentially a list of different tasks for it to do. Like if a player is within a certain distance, summon bots to walk towards it's position with killaura enabled, then just proceed to swarm the player until dead.

bddvlpr commented 5 years ago

Tbh it would be better to just log off the bots and log them in when they approach the bot :thinking:

BlueCyro commented 5 years ago

Tbh it would be better to just log off the bots and log them in when they approach the bot 🤔

Not a feasible strategy on as many servers as you would think. On ones w/o lobbies or queues, this would be perfect but wouldn't work on servers like 2b2t where if you log out, it could take you hours to get back in.

bddvlpr commented 5 years ago

2b2t
Imagine

BlueCyro commented 5 years ago

2b2t Imagine

It's a powerful meta if you know what you're doing. Most players won't be matches for extremely agile pathfinding robots. It wouldn't even be hard to add new abilities like the usage of bows, end crystals, etc. Anybody who knows what they're doing could weaponize baritone snap just like that. And it seems they already have, lol.

bddvlpr commented 5 years ago

You don’t really need knowledge of Java for that, you could just use Impact. But yeah, after that video i’m quite inspired to make a fork myself.

BlueCyro commented 5 years ago

You don’t really need knowledge of Java for that, you could just use Impact.

Does it allow you to make a list of tasks for it to do? I've heard about that client before. I also wish I was any good at Java, I'd love to play with baritone and make my own combat-enabled fork too.

bddvlpr commented 5 years ago

You can use stuff like hunt (basically #follow and Killaura) etc

neverix commented 5 years ago

I'm really interested in how Conner "replaced" some parts with ML. Judging by the MineBot docs, it seems like the current approach is a modified A* (correct me if I'm wrong). I think reinforcement learning could be applied to Minecraft, and it would be really interesting to read the implementation or at least a written summary of what it's doing.

I know Java/Kotlin pretty well as I do Android dev but I don't know much about MC modded clients in particular - I have messed around with making simple mods so I know basic stuff and the general game structure but no further than that. The video just randomly popped up in my recommended and I stumbled upon this repo.

Anyway, waiting for Conner's response on this.

bddvlpr commented 5 years ago

Mixins + forgegradle :heart:

neverix commented 5 years ago

Should be 8:30 for @c0nn3r now.

Mesmerate commented 5 years ago

Not everything has to be machine learning. Most pathfinding uses simple approximations (a* for example); in some basic simulations of movement, these algorithms are actually perfect. In Minecraft, these algorithms are probably pretty close to perfect. The bot in the FitMC video just used basic pathfinding to evade the guy, then it used basic pathfinding to follow him+kill aura. These features are already in Barritone, but automatically switching between them isn't; at least in the video, it's a much simpler automation of Barritone commands, rather than actual machine learning, that was going on.

neverix commented 5 years ago

...but Fit said in the video that he had a conversation with lejiurv and that's how he got the info that Conner replaced some parts with ML, giving it a significant advantage to vanilla Baritone?

c0nn3r commented 5 years ago

I will not be releasing any details at this time.

neverix commented 5 years ago

Aaalright, thanks for the response.

Mesmerate commented 5 years ago

The are multiple techniques involved in machine learning. There's learning by example (back propagation), and then there's learning through experimentation (evolutionary algorithms). Of course, there are no examples of pefect movement, and if there were then that method could just be implemented; that leaves evolution. Neural networks are actually pretty large and hard to simulate. The virtual evolution of neural networks, to become better than vanilla Barritone (if that's possible), would require something like 10000 generations of a population of 1000 neural nets each taking something like a minute to simulate individually. Completing that would take 19 years. You could also have tiny neural networks, with something like 3 layers and 20 neurons, but you're going to hit diminishing returns very quickly and are probably not going to succesfully outperform vanilla Barritone.

neverix commented 5 years ago

There's learning by example (back propagation), and then there's learning through experimentation (evolutionary algorithms).

There are also various very successful techniques for reinforcement learning that usually outperform evolutionary algorithms, including normal and deep Q learning, policy gradients, actor-critic and many more.

Still haven't read through the whole thing, just leaving some notes

neverix commented 5 years ago

I completely agree that it's nearly impossible to do this with neural evolution, but maybe he trained a neural network to approximate a heuristic for pathfinding or rewards for movements in specific directions? I assume that's what was meant by "replacing some parts". Not sure if it would really speed up the process but I guess with enough data from vanilla Baritone it could just as well outperform it

Mesmerate commented 5 years ago

I think reinforcement learning is kind of like learning through memory; it applies to closed systems where there's either a set outcome for each action, or at the very least a fixed probability linked to different outcomes. If you could have some kind of course, featuring a highly varied combination of interlinking parkour jumps, and you kept starting off your bot in a random section of it, you could probably get one that knows how to take paths that, 4 or 5 "moves" down the line, could allow you to save a second or 2. You would still have to go through a lot of work to fine tune that, and statistically speaking, I still think this guy just automated his Barritone, though.

neverix commented 5 years ago

Off-topic: why are you doubling the "r" in Baritone?

c0nn3r commented 5 years ago

Maybe he wrote a differentiable A*? 😱

neverix commented 5 years ago

🤔, 🤔

Mesmerate commented 5 years ago

writing a differentiable A*

I don't think this really means anything.

neverix commented 5 years ago

The rocket is typically used (in this repo) to convey sarcasm, but I searched for it and found some legit results (differentiable A* = you can train a neural network on it btw)

Mesmerate commented 5 years ago

Derivative just means slope... like in lines? Idea being that you're taking your neural network through a multi-dimensional curve towards a local minimum for the cost function, and you're building that curve out of line segments? To be honest, I'm not sure what that has to do with a basic, predefined search algorithm, or how you would go about "writing" it.

neverix commented 5 years ago

I guess, we'll see, eh?

Hyyeve commented 5 years ago

Mn. Certainly seems like we got something interesting happening here. But yeah, not much to do except wait until what's really going on is revealed.

neverix commented 5 years ago

¿Báritone 2.0 papér when?

Hyyeve commented 5 years ago

Honestly IMO tho, implementing ML for baritone movement and/or combat wouldn't be hard - for movement at least, all you need to do is take the current pathfinding, replace parts of it with variables (neurons) and use machine learning to tweak them towards the fastest possible route between two points. I'm no expert in pathfinding or machine learning, but as far as I can tell, there's not a lot of data needed to create perfect minecraft pathfinding - you just have to tweak it towards the fastest possible route, given a fairly small set of extra rules (Such as being able to place and break certain blocks dynamically depending what the player has in their inventory etc)

Combat is harder, because there's no "perfect solution" to a situation, you have to do a lot more training if you want a proficient bot - though, using things like killaura as a starting point, it becomes easier.

(I apologise if I'm mistaken in any of this, as I said, I'm no expert, this is just my opinion from my knowledge of the topics)

neverix commented 5 years ago

IMO ML wouldn't even be needed here - but it looks like using it could result in some improvements

DanFromDiscord commented 5 years ago

It would honestly be really interesting if Conner and/or leijurv decide to sell this combat modification as a form of monetization strategy