|
| 1 | +negmas-app GUI |
| 2 | +============== |
| 3 | + |
| 4 | +The ``negmas-app`` provides a graphical user interface for running negotiations and tournaments |
| 5 | +interactively without writing code. It's ideal for: |
| 6 | + |
| 7 | +- **Education**: Teaching negotiation concepts with visual feedback |
| 8 | +- **Rapid Prototyping**: Testing negotiation scenarios quickly |
| 9 | +- **Experimentation**: Running tournaments and comparing strategies visually |
| 10 | +- **Demonstrations**: Showing negotiation dynamics in real-time |
| 11 | + |
| 12 | +Installation |
| 13 | +------------ |
| 14 | + |
| 15 | +The GUI is distributed as a separate package to keep NegMAS lightweight: |
| 16 | + |
| 17 | +.. code-block:: bash |
| 18 | +
|
| 19 | + pip install negmas-app |
| 20 | +
|
| 21 | +This will install the GUI application along with all necessary dependencies. |
| 22 | + |
| 23 | +Features |
| 24 | +-------- |
| 25 | + |
| 26 | +The negmas-app GUI provides: |
| 27 | + |
| 28 | +- **Interactive Negotiation Setup**: Configure negotiators, preferences, and mechanisms through a visual interface |
| 29 | +- **Real-time Visualization**: Watch negotiations unfold step-by-step with live utility plots |
| 30 | +- **Tournament Management**: Set up and run tournaments with multiple negotiators |
| 31 | +- **Results Analysis**: View statistics, agreement outcomes, and performance metrics |
| 32 | +- **Strategy Comparison**: Compare different negotiation strategies side-by-side |
| 33 | +- **Export Capabilities**: Save negotiations and tournament results for further analysis |
| 34 | + |
| 35 | +Getting Started |
| 36 | +--------------- |
| 37 | + |
| 38 | +After installation, launch the application: |
| 39 | + |
| 40 | +.. code-block:: bash |
| 41 | +
|
| 42 | + negmas-app |
| 43 | +
|
| 44 | +Or from Python: |
| 45 | + |
| 46 | +.. code-block:: python |
| 47 | +
|
| 48 | + from negmas_app import run_app |
| 49 | +
|
| 50 | + run_app() |
| 51 | +
|
| 52 | +Basic Workflow |
| 53 | +-------------- |
| 54 | + |
| 55 | +1. **Create a Negotiation Session** |
| 56 | + |
| 57 | + - Select the negotiation protocol (SAO, Stacked Alternating Offers, etc.) |
| 58 | + - Choose or create negotiators from the available strategies |
| 59 | + - Define the negotiation domain (issues, outcomes, preferences) |
| 60 | + |
| 61 | +2. **Configure Preferences** |
| 62 | + |
| 63 | + - Set utility functions for each negotiator |
| 64 | + - Define reservation values and constraints |
| 65 | + - Optionally add uncertainty or discounting |
| 66 | + |
| 67 | +3. **Run the Negotiation** |
| 68 | + |
| 69 | + - Start the negotiation and watch it progress |
| 70 | + - Pause/resume at any time to examine the current state |
| 71 | + - Step through offers and responses one at a time |
| 72 | + |
| 73 | +4. **Analyze Results** |
| 74 | + |
| 75 | + - View final agreements and utilities |
| 76 | + - Examine negotiation statistics (rounds, time, concessions) |
| 77 | + - Export results to JSON, CSV, or other formats |
| 78 | + |
| 79 | +Running Tournaments |
| 80 | +------------------- |
| 81 | + |
| 82 | +The GUI also supports running tournaments to compare multiple negotiators: |
| 83 | + |
| 84 | +1. Select negotiators to compete |
| 85 | +2. Configure tournament settings (number of rounds, domains, scoring) |
| 86 | +3. Run the tournament |
| 87 | +4. View rankings, statistics, and detailed results |
| 88 | + |
| 89 | +Integration with NegMAS Code |
| 90 | +----------------------------- |
| 91 | + |
| 92 | +The GUI is fully compatible with NegMAS code. You can: |
| 93 | + |
| 94 | +- **Import Custom Negotiators**: Load negotiators defined in your Python code |
| 95 | +- **Use Custom Domains**: Import outcome spaces and utility functions from files |
| 96 | +- **Export for Code**: Save GUI-configured scenarios as Python code |
| 97 | +- **Hybrid Workflow**: Design in GUI, refine in code, or vice versa |
| 98 | + |
| 99 | +Example Use Cases |
| 100 | +----------------- |
| 101 | + |
| 102 | +**Teaching Negotiation Concepts** |
| 103 | + |
| 104 | +Use the GUI to demonstrate negotiation strategies in a classroom setting: |
| 105 | + |
| 106 | +- Show how different strategies (Boulware, Conceder, Tit-for-Tat) behave |
| 107 | +- Visualize the effect of time pressure on agreements |
| 108 | +- Demonstrate Nash bargaining solution vs. actual outcomes |
| 109 | + |
| 110 | +**Testing New Strategies** |
| 111 | + |
| 112 | +Before implementing complex negotiators in code: |
| 113 | + |
| 114 | +- Test high-level strategy concepts with built-in negotiators |
| 115 | +- Experiment with different opponent models |
| 116 | +- Identify promising approaches worth full implementation |
| 117 | + |
| 118 | +**Competition Preparation** |
| 119 | + |
| 120 | +Prepare for ANAC or other negotiation competitions: |
| 121 | + |
| 122 | +- Test your agents against known strategies |
| 123 | +- Run practice tournaments with competition-like settings |
| 124 | +- Analyze weaknesses and refine strategies |
| 125 | + |
| 126 | +**Research Demonstrations** |
| 127 | + |
| 128 | +Present research findings interactively: |
| 129 | + |
| 130 | +- Show live examples of novel negotiation mechanisms |
| 131 | +- Compare baseline vs. improved algorithms visually |
| 132 | +- Create reproducible demonstration scenarios |
| 133 | + |
| 134 | +Troubleshooting |
| 135 | +--------------- |
| 136 | + |
| 137 | +**GUI doesn't start** |
| 138 | + |
| 139 | +- Ensure you have a display environment (the GUI requires a graphical interface) |
| 140 | +- Check that all dependencies are installed: ``pip install --upgrade negmas-app`` |
| 141 | +- On Linux, ensure you have required system libraries (PyQt5 dependencies) |
| 142 | + |
| 143 | +**Negotiators not available** |
| 144 | + |
| 145 | +- The GUI automatically discovers negotiators registered with NegMAS |
| 146 | +- If your custom negotiators don't appear, ensure they're properly registered |
| 147 | +- Check that the negotiator modules are in your Python path |
| 148 | + |
| 149 | +**Performance issues with large tournaments** |
| 150 | + |
| 151 | +- Reduce the number of concurrent negotiations |
| 152 | +- Disable real-time visualization for large-scale tournaments |
| 153 | +- Use the command-line tools for very large experiments (see :doc:`cli_negmas`) |
| 154 | + |
| 155 | +Additional Resources |
| 156 | +-------------------- |
| 157 | + |
| 158 | +- **GitHub Repository**: https://github.com/yasserfarouk/negmas-app |
| 159 | +- **NegMAS CLI**: See :doc:`cli_negmas` for command-line alternatives |
| 160 | +- **NegMAS Core Documentation**: Return to :doc:`overview` for core concepts |
| 161 | +- **Tutorial Videos**: Check the repository for video demonstrations |
| 162 | + |
| 163 | +.. note:: |
| 164 | + The negmas-app GUI is actively developed. For the latest features and updates, |
| 165 | + see the `GitHub repository <https://github.com/yasserfarouk/negmas-app>`_. |
| 166 | + |
| 167 | +See Also |
| 168 | +-------- |
| 169 | + |
| 170 | +- :doc:`cli_negmas` - Command-line interface for automated workflows |
| 171 | +- :doc:`cli_negotiate` - Quick negotiation runs from the terminal |
| 172 | +- :doc:`negotiators` - Available negotiation strategies |
| 173 | +- :doc:`negotiation_mechanisms` - Negotiation protocols and mechanisms |
0 commit comments