Duck Hunt

Bot

[ About | Videos | Download | Run | Details ]


About

This article describes a Java plug-in for the Nintaco NES / Famicom emulator that automatically plays Duck Hunt, both the home console version and the Nintendo Vs. arcade version.


Videos

Watch the bot blast through 30 rounds of Duck Hunt, rolling over the score:

Check out the bot doing the same in Vs. Duck Hunt:


Download

DuckHuntBot_2017-10-15.zip

The .zip contains:


Run

Prerequisites

Load the Plug-in

  1. Extract DuckHuntBot.jar from the downloaded .zip.
  2. Start Nintaco.
  3. Open the Run Program window by selecting Tools | Run Program...
  4. Enter the path to the file in the JAR name field or browse to it using the Find JAR... button.
  5. Press Load JAR to load it.
  6. Press Run.

Home Console Version

  1. Open the home console ROM.
  2. From the title screen, select either Game A, Game B or Game C.
  3. Press Start to begin the selected game and to let the bot take over.

Nintendo Vs. Arcade Version

  1. Open the Nintendo Vs. arcade ROM.
  2. When prompted for DIP Switch settings, press OK to accept the default configuration.
  3. Select Machine | Insert Coin (or press F2) one or more times to gain credits.
  4. With the mouse, select either 1 or 2-PLAYER GAME to start and to let the bot take over.

Details

Paired with Super Mario Bros. in a multicart, the home console version was a pack-in game that, for the most part, served as a tech demo to introduce players to the Zapper. As such, it was designed to be a lot easier to play than the arcade version. For instance, during each round, the arcade version presents 12 ducks / clay pigeons instead of 10 and up to 3 targets at a time instead of just 2. In addition, the targets and their associated hit boxes are smaller as shown in the mock-image below that compares an arcade duck on the left to a home console duck on the right.

Target area

Although the ducks fly behind the tree and the bush in both versions, in the arcade version, those foreground elements actually obstruct the light gun, appearing as silhouettes in the hit boxes:

Tree hit box

To compensate for this, the bot will only fire at ducks flying within the white region in the image below when playing the arcade version.

Target area

The arcade version cycles between rounds of woodland duck hunting, trapshooting and a bonus game. During the latter, up to 35 ducks are shot for extra points; however, the hunting dog repeatedly appears on screen as a decoy and shooting the dog ends the bonus game early. Consequentially, the bot makes a best effort to avoid the dog, even at the expense of losing the occasional duck. But, the dog sometimes gets in the line of fire anyway.

Dog hit

The bot does not use any fancy image recognition techniques or artificial intelligence algorithms. Rather, it uses the Nintaco API to directly peer into CPU Memory, enabling it to track the precise locations of the targets. All of memory addresses used by the bot were discovered through exploration with the Nintaco Hex Editor and the information has been added to the Data Crystal ROMhacking.net wiki.


Copyright © 2017 meatfighter.com
This project is free software; you can redistribute it and/or modify it under the terms of LGPLv2.1.